Turbe$Z Posted October 9, 2016 Posted October 9, 2016 function stats(thePlayer) setPlayerStat ( player, 24, 1000 ) setElementHealth( thePlayer, 200 ) end addEventHandler("onPlayerJoin", stats) what wrong ?? My Fun server: My DD server:
Gravestone Posted October 9, 2016 Posted October 9, 2016 19 minutes ago, Turbo777 said: addEventHandler("onPlayerJoin", stats) The second argument of addEventHandler is the element the handler should be attached to. 'root' is a predefined variable which gets the root element of any function. Use this: addEventHandler("onPlayerJoin", root, stats) Visit addEventHandler for more information. Clan war system http://sh.st/7r4nI
Turbe$Z Posted October 9, 2016 Author Posted October 9, 2016 2 minutes ago, Gravestone said: The second argument of addEventHandler is the element the handler should be attached to. 'root' is a predefined variable which gets the root element of any function. Use this: addEventHandler("onPlayerJoin", root, stats) Visit addEventHandler for more information. i added "root," but doesn't working My Fun server: My DD server:
Gravestone Posted October 9, 2016 Posted October 9, 2016 Oh, setPlayerStat is deprecated, use setPedStat instead. Clan war system http://sh.st/7r4nI
Turbe$Z Posted October 9, 2016 Author Posted October 9, 2016 11 minutes ago, Gravestone said: Oh, setPlayerStat is deprecated, use setPedStat instead. function stats(thePlayer) setPedStat ( thePlayer, 24, 1000 ) setElementHealth( thePlayer, 200 ) end addEventHandler("onPlayerJoin", root, stats) still not working :c My Fun server: My DD server:
Walid Posted October 9, 2016 Posted October 9, 2016 (edited) function stats() setPedStat (source, 24, 1000) setElementHealth(source, 200) end addEventHandler("onPlayerJoin", root, stats) The source of this event is the player who joined. Edited October 9, 2016 by Walid Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Turbe$Z Posted October 9, 2016 Author Posted October 9, 2016 1 minute ago, Walid said: function stats() setPedStat (source, 24, 1000) setElementHealth(source, 200) end addEventHandler("onPlayerJoin", root, stats) The source of this event is the player who joined. Ohh thanks man :DDD My Fun server: My DD server:
Walid Posted October 9, 2016 Posted October 9, 2016 1 minute ago, Turbo777 said: Ohh thanks man :DDD np Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
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