Desaster Posted September 6, 2013 Share Posted September 6, 2013 I have made my first script and need some help my problem is to intergrate a timer into my script as I can set a timer than the player will be freezed than warped to my definied position but what my current script make is warp my player to postion than freese it than unfreese also i wanna make a limitb if one has >5000 only he can use /para it pls tell how it work and tell me my faults in my script Client side : function chadi ( commandName ) setElementFrozen ( getLocalPlayer(), true ) setElementPosition ( getLocalPlayer(), 1544.0194091797, -1352.6119384766, 329.47549438477 ) setElementFrozen ( getLocalPlayer(), false ) takePlayerMoney ( 5000 ) end addCommandHandler ( "para", chadi ) Link to comment
xXMADEXx Posted September 6, 2013 Share Posted September 6, 2013 Not sure, but I think this is what you want: function chadi ( commandName ) if ( isTimer ( TheTimer ) ) then return end setElementFrozen ( getLocalPlayer(), true ) setElementPosition ( getLocalPlayer(), 1544.0194091797, -1352.6119384766, 329.47549438477 ) TheTimer = setTimer ( function ( ) setElementFrozen ( getLocalPlayer(), false ) takePlayerMoney ( 5000 ) end, 5000, 1 ) end addCommandHandler ( "para", chadi ) Link to comment
Desaster Posted September 6, 2013 Author Share Posted September 6, 2013 thnx was right 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