Round Timer and ticket system help
#6

No i do not store them in enums.

these are my team commands, i think u can find them there, because i did not really know what you meanth, i only have my teams defined and cant find a variable that stores it but this:
pawn Код:
CMD:teams(playerid, params[])
{
   new team2count = GetTeamCount(TEAM_USA);
   new team4count = GetTeamCount(TEAM_SOVIET);
   new str[500];
   SendClientMessage(playerid, orange,"|_____| Teams |_____| ");
   format(str, sizeof(str),"USA: %d Players", team2count);
   SendClientMessage(playerid, lightblue, str);
   format(str, sizeof(str),"Russia: %d Players", team4count);
   SendClientMessage(playerid, lightblue, str);
   return 1;
}
CMD:getteam(playerid, params[])
{
   if(PlayerInfo[playerid][Level] >= 4)
   {
       new team[100], Float:x, Float:y, Float:z, interior = GetPlayerInterior(playerid), world = GetPlayerVirtualWorld(playerid);
       if(sscanf(params,"s[100]",team)) return SendClientMessage(playerid, RED,"USAGE: /getteam [teamname USA/EUROPE/Arabia/Soviet/Australia]");
       GetPlayerPos(playerid, x, y, z);
       //---------USA------------------------
       if(strfind(params,"USA",true) != -1) //Returns 4 (Thanks to wiki for helping in strfind).
       {
           for(new i = 0; i < MAX_PLAYERS; i++)
           {
               if(gTeam[i] == TEAM_USA)
               {
                   SetPlayerInterior(i, interior);
                   SetPlayerVirtualWorld(i, world);
                   SetPlayerPos(i, x+3, y, z);
               }
           }
           new string[100];
           format(string,sizeof(string),"Administrator %s has teleported team %s",PlayerName2(playerid),params);
           SendClientMessageToAll(blue, string);
       }
       //----------Soviet-------
       if(strfind(params,"Soviet",true) != -1 || strfind(params,"Russia",true) != -1) //Returns 4 (Thanks to wiki for helping in strfind).
       {
           for(new i = 0; i < MAX_PLAYERS; i++)
           {
               if(gTeam[i] == TEAM_SOVIET)
               {
                   SetPlayerPos(i, x+3, y, z);
                   SetPlayerInterior(i, interior);
                   SetPlayerVirtualWorld(i, world);
               }
           }
           new string[100];
           format(string,sizeof(string),"Administrator %s has teleported team %s",PlayerName2(playerid),params);
           SendClientMessageToAll(blue, string);
       }
    }
    else return SendClientMessage(playerid, RED,"[ERROR]: You are not high enough level to use this command!");
    return 1;
}
Reply


Messages In This Thread
Round Timer and ticket system help - by Proph3t - 10.04.2013, 10:05
Re: Round Timer and ticket system help - by Proph3t - 10.04.2013, 13:26
Re: Round Timer and ticket system help - by [XST]O_x - 10.04.2013, 13:42
Re: Round Timer and ticket system help - by Proph3t - 10.04.2013, 14:06
Re: Round Timer and ticket system help - by [XST]O_x - 10.04.2013, 14:20
Re: Round Timer and ticket system help - by Proph3t - 10.04.2013, 15:32
Re: Round Timer and ticket system help - by Proph3t - 10.04.2013, 16:46
Re: Round Timer and ticket system help - by [XST]O_x - 10.04.2013, 16:50
Re: Round Timer and ticket system help - by Proph3t - 10.04.2013, 17:21

Forum Jump:


Users browsing this thread: 1 Guest(s)