Estevam2d Posted January 5, 2014 Share Posted January 5, 2014 how to tell if I actually have money to move? Server.lua function ls (thePlayer) local playeraccount = getPlayerAccount ( thePlayer ) takePlayerMoney ( thePlayer, 4000 ) setElementPosition ( thePlayer, 1481.0520019531,-1765.6591796875,18.795755386353 ) outputChatBox ('#FFFFFF[ #0DDFFFSpawn de LS#FFFFFF ]: #00FFFF' .. getPlayerName(thePlayer) .. ' #828282Foi para Los Santos por #FF0000$ -1000 #FFFFFF(#00FF00 /ls #FFFFFF)', root, 255, 255, 255, true) end addCommandHandler ( "ls", ls ) Link to comment
DNL291 Posted January 5, 2014 Share Posted January 5, 2014 function ls(thePlayer) if (getPlayerMoney(thePlayer) >= 1000) then takePlayerMoney ( thePlayer, 1000 ) setElementPosition ( thePlayer, 1481.0520019531,-1765.6591796875,18.795755386353 ) outputChatBox ('#FFFFFF[ #0DDFFFSpawn de LS#FFFFFF ]: #00FFFF' .. getPlayerName(thePlayer) .. ' #828282Foi para Los Santos por #FF0000$ -1000 #FFFFFF(#00FF00 /ls #FFFFFF)', root, 255, 255, 255, true) else outputChatBox ("Dinheiro insuficiente para usar este comando", thePlayer, 255, 255, 255, true) end end addCommandHandler( "ls", ls ) 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