Astari Posted November 25, 2011 Share Posted November 25, 2011 Tell me how to make function takePlayerMoney worked so that money does not become less than 0? Link to comment
12p Posted November 25, 2011 Share Posted November 25, 2011 Use something like this: SERVER-SIDE ONLY SCRIPT if getPlayerMoney ( player ) > amountToTakeFromPlayer then --If the money of the player is higher than the money you want to take him from, takePlayerMoney ( player, amountToTakeFromPlayer ) --take the money. else setPlayerMoney ( player, 0 ) --Otherwise, take all the money from him. end THIS WILL NOT WORK. IT'S JUST AN EXAMPLE! 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