Wanted Level
-
hello, i work on safe robbery script but i don't know how to give when a player robbery safe to give it the wanted level
-
@kubacz12 You are not searching the native functions? For example:
void SET_PLAYER_WANTED_LEVEL(Player player, int wantedLevel, BOOL disableNoMission) // 0x39FF19C64EF7DA5B 0xB7A0914B b323
used withSET_PLAYER_WANTED_LEVEL_NOW
or
game.player.WantedLevel
-
@JohnFromGWN So I have to give the game.player.WantedLevel eg 3 and the player gets 3 stars or what do you mean?
-
@kubacz12 I don't know what you are trying to do, but there are get functions to get the values, and set functions to set the values.
You can use native functions or SHVDN. I'm not a programmer, I just create my own scripts and menus, so just play with these functions - they are fairly simple.
-
@kubacz12 I just did a search and there is a tutorial on these forums.
https://forums.gta5-mods.com/topic/825/c-tutorial-basics-of-creating-a-script-part-3
also:
PLAYER::SET_PLAYER_WANTED_LEVEL
void SET_PLAYER_WANTED_LEVEL(Player player, int wantedLevel, BOOL disableNoMission) // 0x39FF19C64EF7DA5B 0xB7A0914B b323Call SET_PLAYER_WANTED_LEVEL_NOW for immediate effect
wantedLevel is an integer value representing 0 to 5 stars even though the game supports the 6th wanted level but no police will appear since no definitions are present for it in the game files
disableNoMission- Disables When Off Mission- appears to always be false
-
@JohnFromGWN But could it be done if a player steals the safe so he gets stars after a few seconds?
-
@kubacz12 Why don't you try? That's how i do it. I try different things and generally after less than a dozen attempts i get it. When I just can't get it fortunately @Jitnaught will solve it. I mean it takes what 20 seconds to go from Visual Studio, to GTA5, hit reload, test, back to VS.
-
Take a look at the ScriptHookVDotNet documentation if you are using it, and keep testing it. Here is the property where you can view and add wanted levels.