Jump to content

Cancel Wanted


VenomOG

Recommended Posts

hello so i have this thugs script that i made and a turfing system
i want to make if player is in turf they cannot get wanted.
 

Quote

function test(player)
 if (getElementData(player,"isInTurf",true) then
      ----- what to put here?
end

 

 

Link to post
setTimer(function(player)
 if (getElementData(player,"isInTurf",true)) then
      if (getPlayerWantedLevel(player) > 0) then
        setPlayerWantedLevel(player, 0)
      end
 end
end, 1000, 0)

 

Edited by LyricalMM
change of script
Link to post
5 minutes ago, LyricalMM said:

setTimer(function(player)
 if (getElementData(player,"isInTurf",true)) then
      if (getPlayerWantedLevel(player) > 0 then
        setPlayerWantedLevel(player, 0)
      end
 end
end, 1000, 0)

 

Gonna test it thanks !
 

Link to post
12 hours ago, Knuck said:

No he helped with some part ill add the rest
 


getElementData(player,"Job","Thugs")

 

Gordon is right this, also this still leaves a 1s (maximum) gap of you having a wanted level inside the turf.

 

What I would suggest is that you:

1. Go to the 'setWantedLevel' function

2. Add an if around it checking if the player is NOT in the turf.

Link to post

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