Jump to content

Money script [HELP]


Recommended Posts

Posted
  
if getPlayerMoney == "99999" then setPlayerName (getRootElement, Cheater) 
outputChatBox ( "Don't cheat or you get banned" , source, 0, 159, 255 ) 
 end 
  

Why doesn't run ? i want when the player get 99999 set his name to cheater and outputchatbox etc...

Posted

It has many errors. First, as Kenix said, in the condition you don't use quotes, because 99999 is a number (integer), and not a string. And getPlayerMoney needs an argument (the player that you want get money). | Second, the function setPlayerName needs a string on second argument (Cheater, in your example, is a variable not declared). So, you must use with quotes (as mjr said: "Cheater").

HINT: Learn Lua. You don't know how to program, so you must learn "walk" before "run".

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...