-
Posts
2,973 -
Joined
-
Last visited
-
Days Won
3
Everything posted by 50p
-
viewtopic.php?f=91&t=27027
-
Oh wait, it's client-side. You don't need to pass source to setTimer but you have to learn Lua a bit more.. Just do this for your onClientMarkerHit event: addEventHandler( "onClientMarkerHit", grav1, function( thePlayer ) if thePlayer == getLocalPlayer( ) then setTimer ( drainSomeWater, 100, 200 ) end end ) In your case you don't need to check if thePlayer is actually player element because it'll be either player or vehicle element that hits the marker. Since they are both elements (userdata type) there will be no warning/error messages due to comparing different data types. Remember, grav1 has to hold a marker before you add the handler function.
-
Add source to your setTimer call and leave drainSomeWater as function drainSomeWater(thePlayer) ... Read wiki carefully. Check setTimer parameters on wiki.
-
http://scripteditor.beta.mtasa.com/50p/modshop.zip
-
You can't replace characters.
-
well i keep getting a "program must be terminated" error? When do you get this error? What XP have you got? Have you installed .NET 2.0? Have you installed MTA or just copied MTA files? Answer these questions in MTASE topic. DO NOT answer them here.
-
What is your 2nd argument and what is triggerServerEvent's 2nd parameter? Also, you'll need 3rd argument because you seem to have a parameter in server-side GiveWeaponOnBuy which will be nil. You can remove that parameter though and use client instead. function GiveWeaponOnBuy( ) giveWeapon ( client, 28, 100 ); -- client is the player who triggered this event end addEvent("submitBuy",true) addEventHandler("submitBuy",root,GiveWeaponOnBuy)
-
Like norby said: viewtopic.php?f=91&t=23895&p=289200#p289183
-
You're doing something wrong.. that's why. Like what? Should i post one of the teleport that is not working? Of course... How do you expect us to know your code?
-
You're doing something wrong.. that's why.
-
viewtopic.php?f=91&t=26541 viewtopic.php?f=91&t=27027
-
It's fine to name variables "source", as long as function isn't attached to any event. I always use "source" as a variable name for the player element in command functions and that doesn't cause any problems. Only commands and the functions a handler calls can have source as parameter, although if the function is called from a function that is called by an event it will still pass source in. addEventHandler( "onPlayerJoin", getRootElement(), function( ) playerJoined( ); end ) function playerJoined( ) -- notice the source is not a parameter but it's still passed here outputChatBox( getPlayerName( source ) .. " joined the server." ); end I strongly do NOT recommend using source as parameter because if you can easily forget about the difference between command handlers and event handlers.. Or you may want tu use same function for a command and an event. He is... setTimer(setVehicleFrozen,50,1,vehicle,false) But the interval is too short. You should keep the vehicle frozen until collision is fully loaded. You can check if collision has loaded with processLineOfSight in client-side script but if you think it'll be too complicated for you to make, then use higher interval value like 1000.
-
I'll be getting access to Win7 machine soon. Hopefully, I'll have a chance to look at it. EDIT: I have checked it myself and it works as well for me on Win7 x64 as on WinXP Pro x86.
-
Tables with numbers as their indices are faster to process in loops. Besides, you can add new items by using table.insert which I prefer.
-
That's what he's doing but for some reason he hides it just after creating it...
-
Tables are good for this kind of stuff. But in this case, your table has too many {'s and it's not necessary to have item1, item2, etc. PLAYERS[player].inventory = { { description = "some description", amount = 52, weight = 12 }, { description = "item2 description", amount = 4, weight = 52 }, --.... etc .... } PLAYERS[player].inventory[1] -- will be the first item (table)
-
http://scripteditor.beta.mtasa.com/50p/bank.zip
-
Are you sure these coords are correct? Also, make sure you don't have a "folder resource" with the same name as the zipped resource in resources folder. Personally, I've stopped using Interiors resource since DP2 days where it was laggy due to animated markers.
-
You better help yourself before you start helping others. Read the topic title.. It says "Need Some One Who Can Make Good Scripts To Join Us !", from all your questions that you asked on the forums, I'm pretty sure you're far from making "Good Scripts".
-
@Piorun triggerEvent in onClientRender event? Smart move... Creating tens of objects (depends how many players there are) at 1 single frame? Another smar move... How many objects would it create after a minute of playing? How much time would you be able to play before it starts to lag you? How quickly would the MTA elements limit be reached? Think about what your code is doing at the moment and then think again. Your code is totally messed up. local ox, oy, oz = createObject(....) -- What the...?! createObject returns object element that was created, so what oy and oz are for? And what do you need it for if you don't use it anywhere after this line? @varez Why do you say "in your language" if you speak the same language?
-
https://forum.multitheftauto.com/viewtop ... 91&t=27027
-
If you want to get data from an account you better make sure the data has been stored before, that is, make sure getAccountData returns the data that you expect it to return.. If it'll return false then your setElementData will set player's "skin" data to false... After that you use setAccountData to set player's account data "skin" to false. You have to think in advance. What will happen if player joins your server for the first time and you try to get his account data and set it as element data? If you save player's skin, then why don't you use getElementModel instead? It saves memory because you don't have to store his skin ID in as element data.