HeK Posted November 21, 2012 Share Posted November 21, 2012 How do i add stars to the player not set, because i had 2 stars and when i touched a marker, it gave me 1 and i lost the other one, i want it to add, not set, and another thing, i'd like it to outputChatBox saying "You were spotted robbing this house" when player randomly gets a star. How should i do that? function givePlayerRobPay () money = math.random ( 150, 900 ) wantedlevel = math.random ( 0, 2 ) givePlayerMoney ( source, money ) setPlayerWantedLevel ( source, wantedlevel ) outputChatBox ( "You made $" ..money, source ) outputChatBox ( "You were spotted robbing this house.", source ) fadeCamera ( source, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 2500, 1, source, true, 1 ) end Link to comment
Anderl Posted November 21, 2012 Share Posted November 21, 2012 1. Use local variables. 2. I don't see where "source" is defined. 3. Set wanted level this way: playerWantedLevel + wantedlevel ( e.g. setPlayerWantedLevel( player, getPlayerWantedLevel( player ) + wantedlevel ) ). 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