VenomOG Posted December 4, 2018 Share Posted December 4, 2018 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 comment
Moderators Patrick Posted December 4, 2018 Moderators Share Posted December 4, 2018 what? Link to comment
VenomOG Posted December 4, 2018 Author Share Posted December 4, 2018 8 minutes ago, Patrick2562 said: what? I want to cancel player wanted levels. like if he or she damages someone else and there in that getelement data, gives no wanted Link to comment
Moderators Patrick Posted December 4, 2018 Moderators Share Posted December 4, 2018 9 minutes ago, Knuck said: I want to cancel player wanted levels. like if he or she damages someone else and there in that getelement data, gives no wanted https://wiki.multitheftauto.com/wiki/SetPlayerWantedLevel Link to comment
VenomOG Posted December 4, 2018 Author Share Posted December 4, 2018 3 minutes ago, Patrick2562 said: https://wiki.multitheftauto.com/wiki/SetPlayerWantedLevel How does this cancel it Link to comment
LyricalMM Posted December 4, 2018 Share Posted December 4, 2018 (edited) setTimer(function(player) if (getElementData(player,"isInTurf",true)) then if (getPlayerWantedLevel(player) > 0) then setPlayerWantedLevel(player, 0) end end end, 1000, 0) Edited December 4, 2018 by LyricalMM change of script Link to comment
VenomOG Posted December 4, 2018 Author Share Posted December 4, 2018 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 comment
Gordon_G Posted December 4, 2018 Share Posted December 4, 2018 A getElementData everu second and for every player (?) what a good optimisation Link to comment
VenomOG Posted December 4, 2018 Author Share Posted December 4, 2018 9 minutes ago, Gordon_G said: A getElementData everu second and for every player (?) what a good optimisation No he helped with some part ill add the rest getElementData(player,"Job","Thugs") Link to comment
ViRuZGamiing Posted December 5, 2018 Share Posted December 5, 2018 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 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