Kostis Posted May 31, 2012 Share Posted May 31, 2012 Hello guys i just started learning .lua and i start reading from wiki is it ok, or you suggest me to read something else? Thanks I wish i could make a roleplay server one day Link to comment
Flaker Posted May 31, 2012 Share Posted May 31, 2012 https://forum.multitheftauto.com/viewtopic.php?f=148&t=40809 In the wiki a lot of useful information, I advise you to read and memorize as much as possible from the wiki. Link to comment
Stanley Sathler Posted June 1, 2012 Share Posted June 1, 2012 Hint: if you normally play Roleplay Servers, whenever you see a script, try to imagine (in your head) how you would do an equal. Try imagine the conditions (if/else), the variables... this will help you so much with the time. Link to comment
Jaysds1 Posted June 1, 2012 Share Posted June 1, 2012 Hint: if you normally play Roleplay Servers, whenever you see a script, try to imagine (in your head) how you would do an equal. Try imagine the conditions (if/else), the variables... this will help you so much with the time. here's an example: if I point a gun at a police, then I would get 1 star done, script now: addEventHandler("onPlayerTarget",root,function(target) --When the player targets if(getElementType(target)=="player")then --get what they're pointing at and check if it's another player if(getTeamName(getPlayerTeam(target))=="Police")then --get the the target(the player) team name, and if they're in the police team setPlayerWantedLevel(source,1) --set their(the player that targeted) wanted level to 1 end end)--done Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now