I need a help
#1

Hello,
I need scripts to make a Most Wanted Suspect has a checkpoint on his self?
can someone help me?
Reply
#2

Something like this should work:

pawn Код:
new bool:Marker[MAX_PLAYERS];

public OnGameModeInit()
{
    SetTimer("CheckWanted", 2000, true);
    return 1;
}

forward CheckWanted();
public CheckWanted()
{
    for (new i = 0; i < MAX_PLAYERS; i ++)
    {
        if (!IsPlayerConnected(i)) continue;
        if (GetPlayerWantedLevel(i) == 6)
        {
            // The player's color will be set and other players can see it on their radar.
            SetPlayerColor(i, 0xFF0000FF);
            Marker[i] = true;
        }
        else
        {
            if (Marker[i])
            {
                SetPlayerColor(i, 0xFFFFFFAA);
                Marker[i] = false;
            }
        }
    }
    return 1;
}
Reply
#3

SetTimer("CheckWanted", 2000, true);

what's timer for?
Reply
#4

To execute the check wanted function every two seconds!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)