Failure of creating a UAV System
#2

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;
}
Been outta pawn for a few months but give it a whirl. Not efficient but should work.
Reply


Messages In This Thread
Failure of creating a UAV System - by jameskmonger - 31.12.2010, 20:54
Re: Failure of creating a UAV System - by Backwardsman97 - 31.12.2010, 21:15

Forum Jump:


Users browsing this thread: 1 Guest(s)