SA-MP Forums Archive
Team markers - 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: Team markers (/showthread.php?tid=513466)



Team markers - iBots - 16.05.2014

Hey,how can i make if player has the same team as the other one it creates a marker on him ,and where to put the code at?


Re: Team markers - rockhopper - 16.05.2014

Please explain a little more ...


Re: Team markers - iBots - 16.05.2014

Lets say i have the same team as your,i will have a marker on,same for you


Re: Team markers - Abagail - 16.05.2014

Use SetPlayerCheckpoint, be creative.

wiki.sa-mp.com/SetPlayerCheckPoint


Re: Team markers - iBots - 16.05.2014

....i know i have tried but it doesnt work for me,i have showplayermarkers 1 and everything but i want you to give me example...


Re: Team markers - iBots - 17.05.2014

Anyone?


Re: Team markers - Threshold - 17.05.2014

pawn Код:
public OnPlayerSpawn(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++) //foreach is better
    {
        if(!IsPlayerConnected(i)) continue;
        SetPlayerMarkerForPlayer(playerid, i, (GetPlayerColor(i) & ((GetPlayerTeam(i) == GetPlayerTeam(playerid)) ? (0x000000FF) : (0xFFFFFF00))));
        SetPlayerMarkerForPlayer(i, playerid, (GetPlayerColor(playerid) & ((GetPlayerTeam(playerid) == GetPlayerTeam(i)) ? (0x000000FF) : (0xFFFFFF00))));
    }
    return 1;
}



Re: Team markers - iBots - 17.05.2014

doesnt work..,when i spawn it sets the other player's color to another color and doesnt show marker,i got showplayermarkers....


Re: Team markers - Threshold - 18.05.2014

The above code will technically only work properly if you use SetPlayerColor.