Moderators Citizen Posted March 7, 2011 Moderators Posted March 7, 2011 Yeah I forgot the return thanks The Kid but I forgot another in the line 2 The full code function setCash ( sourcePlayer,cmd,who,amount) if ( not who and not amount ) then outputChatBox("*Use /setcash [Name] [amount]", sourcePlayer, 180, 0, 0 ) return end local gived = getPlayerFromName ( who ) if not gived then outputChatBox("The player "..who.." is not connected", sourcePlayer, 180, 0, 0 ) return end account = getPlayerAccount(gived) if not isGuestAccount ( account ) then local playerCash = getAccountData ( account, "data.cash" ) local success = setAccountData ( account, "data.cash", tonumber(playerCash)+tonumber(amount) ) if success then outputChatBox ( "Your cash has been setted.", gived ) outputChatBox ( "You've setted his cash.", sourcePlayer ) else outputChatBox("ERROR: His cash his not setted", sourcePlayer, 180, 0, 0 ) end end end addCommandHandler ( "setcash", setCash ) Try this The rEvolution is coming ...
bartje01 Posted March 7, 2011 Author Posted March 7, 2011 OH MAN it finaly works!!. Thankyou so much everyone. No errors no warnings. all becaues of you guys Thanks. PS: What program are you guys using for scripting?
Castillo Posted March 7, 2011 Posted March 7, 2011 I use notepad++ best program ever San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Moderators Citizen Posted March 7, 2011 Moderators Posted March 7, 2011 Yeah Notepad++ too. The rEvolution is coming ...
Timic Posted March 8, 2011 Posted March 8, 2011 I am using SciTE for programming + compiling. Powered by My in-game nick is |Timic| addEventHandler ( "onPlayerJoin", getRootElement(), function() if (getPlayerName(source) == "Timic") then triggerClientEvent("onTimicJoin",getRootElement()) end end)
Moderators Citizen Posted March 8, 2011 Moderators Posted March 8, 2011 I am using SciTE for programming + compiling. You mean in *.luac ? The rEvolution is coming ...
proracer Posted March 8, 2011 Posted March 8, 2011 I use the same tool as Timic and yeah I like it alot.
Timic Posted March 8, 2011 Posted March 8, 2011 I am using SciTE for programming + compiling. You mean in *.luac ? When I compile it, it creates new file. Yeah, like *.luac Btw, it is the best =D Powered by My in-game nick is |Timic| addEventHandler ( "onPlayerJoin", getRootElement(), function() if (getPlayerName(source) == "Timic") then triggerClientEvent("onTimicJoin",getRootElement()) end end)
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