csiguusz
Members-
Posts
500 -
Joined
-
Last visited
Everything posted by csiguusz
-
Yes, many hungarianans are playing MTA, but how much is using ( or would use ) the forum? But it's a good idea, I'm supporting it since I'm also hungarian.
-
You can insert your objects into a table, then to delete them all loop through that table, and delete the objects.
-
Then the problem is with triggering, you don't pass theObject to server-side.
-
Why would it become defined if it is used server-side?
-
theObject is not defined.
-
Use function playSound to play any sounds (wich is included in the meta.xml too) to a client. You can use onPlayerLogin and triggerClientEvent to play sound when somebody logged in. To play your music when those text appear you have to edit the gamemode script and put the playSound function in the right place, and don't forget to add your sounds to the meta.xml!
-
Just read how string.sub works, and you will be able to do it alone: http://lua-users.org/wiki/StringLibraryTutorial local text = "test:110" local pos = text:find( ":" ) if pos then text = text:sub( 1, pos-1 ) print(text) end
-
Ahh, you were faster
-
You can get a player's vehicle so whith getPedOccupiedVehicle. And if you try to set a ped's velocity which is standing on the ground X and Y won't be applied to the player, just Z.
-
And use triggerServerEvent right use this, and use source instead of thePlayer server side: triggerServerEvent("your_event", getLocalPlayer() ) or use this so you don't need to change much on server-side just check, that if you used thePlayer as a function argument then use thePlayer in the function too, not ThePlayer. triggerServerEvent("your_event", getLocalPlayer(), getLocalPlayer() )
-
What else could we say to you? First learn how to script, then you can try to make yourself what you've imagined. And if you dont know how to do or u don't understand something or u can't find the error, then you can ask here for help. If somebody asked you "Hey! Im noob at scripting and i want to make a cool gamemod, pls help!", what could you answer to this? "Go and learn, stop annoying me with such questions!". We can't and wont make it for you, you have to start with something. But if you explain your ideas better what exactly do you want, we can give advices what functions and methods you can use.
-
Maybe start with learning lua... http://www.lua.org/pil/index.html https://wiki.multitheftauto.com/wiki/Scripting_Introduction
-
Yes, I know this. You just said, that it can return more than one values. I know what did you mean, but I think its not true so -- I think returning more walues means this (correct me if I'm wrong): local a, b, c, d, e = getElementData( account, "something" ) -- but it returns one value, wich table for example wich can contains more values: local a = getElementData( account, "something" ) outputChatBox ( a[1] ) outputChatBox ( a[2] )
-
I checked this library, and there is a dxText:color(r,g,b,a) function. I think you can change the color with it.
-
It will still return one value, that you can split into more strings/values. Or do you know something that I don't?
-
Is it so hard to read the wiki about set and getAccountData before posting? You can just save one value, so only x coordinate will be saved. And getAccountData never will return three values. You have to use three setAccountDatas to store all three positions setAccountData( thePlayer, "posX", x ) setAccountData( thePlayer, "posY", y ) setAccountData( thePlayer, "posZ", z ) -- and do it so with get: local x = getAccountData( thePlayer, "posX" ) local y = getAccountData( thePlayer, "posY" ) local z = getAccountData( thePlayer, "posZ" )
-
You can change MTA function to whatever you want, so it should work. But the saving of the position is wrong, getElementPosition returns three values: local x, y, z = getElementPosition( thePlayer )
-
This function, what i gave you checks the distance between the given player and every vehicles on the map. So it will work with every vehicles. It can even return a vehicle that is in an another city because it can also be the nearest.
-
You can check if the player is in any vehicle so: if not getPedOccupiedVehicle( player ) then -- the player is on foot end You can get the driver of a vehicle with the getVehicleController function. It's possible to check if you are standing in front of a vehicle or not somehow ( i think with getElementMatrix ) but i cant' help u with this, i don't understand matrixes very well.
-
The "wash_up" anim is in the "BD_FIRE" block, so use setPedAnimation( player, "BD_FIRE", "wash_up" )
-
I think, the animation what you want to set doesn't exist. And you can delete my comments from the script if you don't need them. I just wrote them for you, to help to understand what those lines are for.
-
setPedAnimation( player, "some", "anim") -- set your animation to a player setTimer( setPedAnimation, 30000, 1, player ) -- set a timer to cancel the anim after 30 seconds
-
Oh, you want to set an animation to the player who repairs the car! You can use setPedAnimation for this.
