wesleywillems17 Posted December 23, 2016 Share Posted December 23, 2016 Hi all, I'm busy with a drug transport script for my server. I'm trying to add a wanted level function to it so that if the player deliverd the van he will get 2 start of wanted level. But my problem is when i use setPlayerWantedLevel (thePlayer, 2) and the player has 4 start then the player will lose 2 start. Can somebody tell me how to fix this? Link to comment
..:D&G:.. Posted December 23, 2016 Share Posted December 23, 2016 (edited) setPlayerWantedLevel(thePlayer, (getPlayerWantedLevel(thePlayer) + 2)) Edited December 23, 2016 by ..:D&G:.. Link to comment
ViRuZGamiing Posted December 23, 2016 Share Posted December 23, 2016 6 minutes ago, wesleywillems17 said: Hi all, I'm busy with a drug transport script for my server. I'm trying to add a wanted level function to it so that if the player deliverd the van he will get 2 start of wanted level. But my problem is when i use setPlayerWantedLevel (thePlayer, 2) and the player has 4 start then the player will lose 2 start. Can somebody tell me how to fix this? function setWantedLevel(player, wanted) if (getPlayerWantedLevel(player) > wanted) then setPlayerWantedLevel(player, wanted) end end 1 minute ago, ..:D&G:.. said: setPlayerWantedLevel(thePlayer, (getPlayerWantedLevel(thePlayer) + 2)) This will increased the current wanted level, I think the deal is that you wouldn't want the wanted level to lower when set lower but be higher when set higher Link to comment
..:D&G:.. Posted December 23, 2016 Share Posted December 23, 2016 42 minutes ago, ViRuZGamiing said: function setWantedLevel(player, wanted) if (getPlayerWantedLevel(player) > wanted) then setPlayerWantedLevel(player, wanted) end end This will increased the current wanted level, I think the deal is that you wouldn't want the wanted level to lower when set lower but be higher when set higher He wants to add 2 more stars to the current wanted level of the player... Your function won't do the trick if the player has 1 or 2 stars.... Link to comment
ViRuZGamiing Posted December 23, 2016 Share Posted December 23, 2016 3 minutes ago, ..:D&G:.. said: He wants to add 2 more stars to the current wanted level of the player... Your function won't do the trick if the player has 1 or 2 stars.... my bad, didn't read the question properly 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