31.12.2010, 20:54
I have tried to create a UAV System (and I was infact hesitant to post my attempts here) but it doesn't work. I type /uav and get the message "Friendly UAV Online!" but neither the enemies nor the friends do not show up on my radar.
pawn Код:
if(strcmp(cmdtext, "/uav", true, 3) == 0)
{
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]) {
SetPlayerMarkerForPlayer( playerid, i, GetColorForTeam(gTeam[playerid]) );
for(new j; j>MAX_PLAYERS; j++) {
if(!hasDied[i]) {
if(gTeam[j] == gTeam[i]) {
SetPlayerMarkerForPlayer( i, j, GetColorForTeam(gTeam[j]) );
SendClientMessage(i, 0xFFFFFFFF, "{00FF00}Friendly UAV Online!");
} else if(gTeam[j] != gTeam[i]) {
SetPlayerMarkerForPlayer( i, j, GetColorForTeam(gTeam[j]) );
SendClientMessage(j, 0xFFFFFFFF, "{FF0000}Enemy UAV Online!");
}
}
}
} else if(gTeam[i] != gTeam[playerid]) {
SetPlayerMarkerForPlayer( playerid, i, GetColorForTeam(gTeam[i]) );
SendClientMessage(i, 0xFFFFFFFF, "{FF0000}Enemy UAV Online!");
}
}
}
}
return 1;
}