Log in to reply

[C#] Detect cop mode?

  • How would I go about detecting what mode the cops are in? (Pursuit/Search modes)

    As in,

    if searchmode = true
    do this

  • u mean when the stars flash? and cop search for you? I actually want to figure this out myself xd


    BOOL ARE_PLAYER_STARS_GREYED_OUT(Player player) perhaps?

  • @ikt said in [C#] Detect cop mode?:


    Sorry, I'm new to this - if I was to put that in my code how would it be?

        if (ARE_PLAYER_STARS_GREYED_OUT(Player player) = True) {
            // do stuff

  • @FelixTheBlackCat I'm thinking you use C#, so in that case it would be:

    if (Function.Call(Hash.ARE_PLAYER_STARS_GREYED_OUT, Game.Player))
        // do stuff

  • @AHK1221 said in [C#] Detect cop mode?:

    if (Function.Call(Hash.ARE_PLAYER_STARS_GREYED_OUT, Game.Player))
    \ do stuff
    Thanks for the help! However, I'm getting this issue:

    Cannot implicitly convert type 'void' to 'bool'

    My code:

  • @FelixTheBlackCat yeah forgot you need to put <bool> after Function.Call like this:

    if (Function.Call<bool>(bla bla bla))
        \\do stuff

    Also why do you check for the wanted level later in the code?

  • @AHK1221 Thank you! Works perfectly. And as for the wanted level check, I was just first implementing it, that will be moved in a moment ;)

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.