Jump to content

setPlayerWantedLevel


Recommended Posts

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
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
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

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...