xXMADEXx Posted December 8, 2012 Posted December 8, 2012 Hey, i have a script that i just made... For some reason it will not come out in green, it comes out in that default tan color. And i am not sure how to make it so that if the player dose not have $300 it wont work. It just goes into negative, and i dont wont that. function ads(player,...) local text = table.concat({...}, " ") outputChatBox("Advertisment: ".. text .."!", 0, 100, 0) takePlayerMoney(player, 300) end addCommandHandler("ad", ads)
Cadu12 Posted December 8, 2012 Posted December 8, 2012 function ads(player,...) local text = table.concat({...}, " ") if (getPlayerMoney(player) >= 300) then outputChatBox("Advertisment: ".. text .."!", root, 0, 100, 0) takePlayerMoney(player, 300) end end addCommandHandler("ad", ads)
xXMADEXx Posted December 8, 2012 Author Posted December 8, 2012 function ads(player,...) local text = table.concat({...}, " ") if (getPlayerMoney(player) >= 300) then outputChatBox("Advertisment: ".. text .."!", root, 0, 100, 0) takePlayerMoney(player, 300) end end addCommandHandler("ad", ads) thank you!
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