public OnPlayerRequestClass(playerid,classid)
{
switch(classid)
{
case 0:
{
SetPlayerTeam(playerid,******);
SetPlayerColor(playerid,******");
SetPlayerPos(playerid, ******);
SetPlayerCameraPos(playerid, ******);
SetPlayerCameraLookAt(playerid, ******);
SendClientMessage(playerid,0x2641FE00,"******");
SendClientMessage(playerid,0x2641FE00,"******");
SendClientMessage(playerid,0x2641FE00,"******");
SendClientMessage(playerid,0x2641FE00,"******");
return 1;
}
case 1:
{
SetPlayerTeam(playerid,******);
SetPlayerColor(playerid,******");
SetPlayerPos(playerid, ******);
SetPlayerCameraPos(playerid, ******);
SetPlayerCameraLookAt(playerid, ******);
SendClientMessage(playerid,0x2641FE00,"******");
SendClientMessage(playerid,0x2641FE00,"******");
SendClientMessage(playerid,0x2641FE00,"******");
SendClientMessage(playerid,0x2641FE00,"******");
return 1;
}
}
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerTeam(i) == GetPlayerTeam(playerid))
{
SetPlayerMarkerForPlayer(playerid, i, COLOR);
}
}
https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer Quick example: pawn Код:
You can also use the foreach loop, whatever works for you |
https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer Quick example: pawn Код:
You can also use the foreach loop, whatever works for you |
public OnPlayerSpawn(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerTeam(i) != GetPlayerTeam(playerid) && i != playerid)
{
ShowPlayerNameTagForPlayer(playerid, i, false);
SetPlayerMarkerForPlayer(playerid, i, GetPlayerColor(i) & 0xFFFFFF00);
}
}
}
PHP код:
|