31.12.2010, 21:15
pawn Код:
if(!strcmp(cmdtext, "/uav", true))
{
if(playerInfo[playerid][UAV] == 1)
{
SendClientMessage(playerid, 0xFFFFFFFF, "{00FF00}Friendly UAV Online!");
playerInfo[playerid][UAV] = 0;
for(new i; i<MAX_PLAYERS; i++)
{
if(!hasDied[i])
{
if(gTeam[i] == gTeam[playerid])
{
if(i != playerid)
{
SendClientMessage(i, 0xFFFFFFFF, "{00FF00}Friendly UAV Online!");
SetPlayerMarkerForPlayer( playerid, i, GetColorForTeam(gTeam[playerid]) );
for(new j; j<MAX_PLAYERS; j++)
{
if(!hasDied[j])
{
if(gTeam[j] == gTeam[i])
SetPlayerMarkerForPlayer( i, j, GetColorForTeam(gTeam[i]) );
else
SetPlayerMarkerForPlayer( i, j, GetColorForTeam(gTeam[j]) );
}
}
}
}
else
{
SetPlayerMarkerForPlayer( playerid, i, GetColorForTeam(gTeam[i]) );
SendClientMessage(i, 0xFFFFFFFF, "{FF0000}Enemy UAV Online!");
}
}
}
}
return 1;
}