SetPlayerMarkerForPlayer won't show on radar
#1

I tested these two command in-game and they do set my name colour, but they don't set the blip on the radar.

pawn Код:
public OnPlayerStreamIn(playerid, forplayerid)
{
    if(SituationInProgress[playerid] == 1)
    {
        if((0 < PlayerInfo[playerid][pFaction] < 21) && FactionInfo[PlayerInfo[playerid][pFaction]][fType] == 1)
        {
            SetPlayerMarkerForPlayer(forplayerid, playerid, 0x2641FEFF);
        }
    }
    return 1;
}

CMD:57(playerid, params[])
{
    new szString[165];
    if(FactionInfo[PlayerInfo[playerid][pFaction]][fType] != 1)
    {
        FactionOnly(playerid);
        return 1;
    }
    if(!IsPlayerInAnyVehicle(playerid))
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "* This can only be used inside a vehicle.");
        return 1;
    }
    if(SituationInProgress[playerid] == 0)
    {
        SituationInProgress[playerid] = 1;
        foreach(new i : Player)
        {
            if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction])
            {
                SetPlayerMarkerForPlayer(playerid, i, 0x2641FEFF);
            }
        }
        format(szString, sizeof(szString), "%s %s, 10-57, %s, over.", GetFactionRank(playerid), GetName(playerid), GetZone(playerid));
        SendDispatchMessage(szString);
    }
    else
    {
        SituationInProgress[playerid] = 0;
        foreach (new i : Player)
        {
            if(gPlayerLogged[i] == 1)
            {
                SetPlayerMarkerForPlayer(playerid, i, TEAM_HIT_COLOR);
                SetPlayerColour(playerid);
            }
        }
        format(szString, sizeof(szString), "%s %s, 10-99 on last 10-57, over.", GetFactionRank(playerid), GetName(playerid), GetZone(playerid));
        SendDispatchMessage(szString);
    }
    return 1;
}

CMD:panic(playerid, params[])
{
   
    new szString[128];
    if(FactionInfo[PlayerInfo[playerid][pFaction]][fType] != 1)
    {
        FactionOnly(playerid);
        return 1;
    }
    if(RequestingBackup[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED,"* You have already used your panic button in the last minute.");
        return 1;
    }
    SetTimerEx("PanicReset", 60000, false, "d", playerid);
    RequestingBackup[playerid] = 1;
    foreach(new i : Player)
    {
        if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction])
        {
            SetPlayerMarkerForPlayer(playerid, i, 0xFF6347FF);
        }
    }
    SendClientMessage(playerid,COLOR_LIGHTRED,"[Panic]{FFFFFF} You have activated your panic beacon.");
    format(szString, sizeof(szString), "[COMM] %s %s has pressed %s panic button at %s, over.", GetFactionRank(playerid), GetName(playerid), GetZone(playerid));
    return SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_DBLUE, szString);
}

forward PanicReset(playerid);
public PanicReset(playerid)
{
    new str[128];
    foreach (new i : Player)
    {
        if(gPlayerLogged[i] == 1)
        {
            SetPlayerMarkerForPlayer(playerid, i, TEAM_HIT_COLOR);
            SetPlayerColour(playerid);
        }
    }
    SendClientMessage(playerid,COLOR_LIGHTRED,"[Panic]{FFFFFF} Your panic beacon has been reset.");
    RequestingBackup[playerid] = 0;
}
Reply
#2

You have any colors used under players class like TEAM_COP color is blue etc?
Reply
#3

Cops are mostly white to other players (TEAM_HIT_COLOR) but I'm trying to make cops who called a pursuit (/57) blue and cops who need backup (/panic) red.
Reply
#4

Uhm, Try SetPlayerColor, That also changes player name color as well as minimap color.
Reply
#5

But then that will show it to non-cops, I want it so that only cops can see cops requesting backup.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)