SA-MP Forums Archive
ShowPlayerMarker - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ShowPlayerMarker (/showthread.php?tid=311274)



ShowPlayerMarker - Gooday - 15.01.2012

How i can make a command:

/showme ----> show all the skins n*50 a red marker in the map and after 5 minutes remove automatically the marker? +REP!


AW: ShowPlayerMarker - Drebin - 15.01.2012

Highlight every player with skin ID 50 with a red marker for 5 mins?


Re: ShowPlayerMarker - Scarred - 16.01.2012

pawn Код:
new Shown[MAX_PLAYERS] = -1;

if (strcmp("/showme", cmdtext, true, 7) == 0)
    {
        if(Shown[playerid] == -1) {
            for(new i=0; i<MAX_PLAYERS; i++) {
                // Make the players marker red to all currently online players.
                SetPlayerMarkerForPlayer(i, playerid, 0xFF0000FF);
            }
            Shown[playerid] = 1;
            SetTimerEx("HideMarker", 60000*5, 1, "i", playerid);
        }
        else return 0; //Already shown!
    }
    return 0;
}

forward HideMarker(playerid);
public HideMarker(playerid)
{
    for(new i=0; i<MAX_PLAYERS; i++) {
        SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00 );
        Shown[playerid] = -1;
    }
    return 1;
}