[SOLVED] /paramedics Command
#3

Quote:
Originally Posted by mansonh
Can you show the definition for gTeam.
Is each player limited to just the one team?
If not then you need to use & and not ==.
Sure I can. Here it is:

pawn Код:
#define TIME_PARAMEDICO 10

new gTeam[MAX_PLAYERS];

SetPlayerTeamFromClass(playerid, classid) {

     if(classid == 0) {

            gTeam[playerid] = TIME_PARAMEDICO;

        }
Here's what you want. If it's not, please tell me.

And yes, this command is just for players that are not in the TIME_PARAMEDICO, or Paramedic Team.

EDIT --

I made it work... but for teams that are not Paramedic o.o

I did this now:

pawn Код:
if(strcmp(cmdtext,"/paramedicos", true) == 0)  {
      if(gTeam[playerid] != TIME_PARAMEDICO) {
            SendClientMessage(playerid, COR_ROXO, "> Vocк chamou os Paramйdicos. Aguarde neste local.");
            new cel = SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
            SetTimerEx("LimparCel", 5000, false, "LimparCel", cel);
            pediucura[playerid] = 1;
            new current_zone;
            current_zone = player_zone[playerid];
            for(new i; i<MAX_PLAYERS; i++){
            if(IsPlayerConnected(playerid && gTeam[playerid] == TIME_PARAMEDICO))  {
                new solicitador[MAX_PLAYER_NAME];
                new str[128];
                GetPlayerName(playerid, solicitador, sizeof(solicitador));
                SendClientMessage(playerid, COR_VERMELHO, "teste");
                format(str, 128, "[QG]> %s solicita paramйdicos. Local: %s", solicitador, zones[current_zone][zone_name]);
                SendClientMessage(playerid, COR_PARAMEDICO, str);
                return 1;
            }
            }
        } else if(gTeam[playerid] == TIME_PARAMEDICO)  {
          SendClientMessage(playerid, COR_VERMELHO, "> Paramйdicos nгo podem usar este comando!");
          return 1;
        }
    }
Any ideas?
Reply


Messages In This Thread
[SOLVED] /paramedics Command - by OxygenBR - 12.01.2010, 18:01
Re: [HELP] /paramedics Command - by mansonh - 12.01.2010, 18:15
Re: [HELP] /paramedics Command - by OxygenBR - 12.01.2010, 18:37
Re: [UNSOLVED] /paramedics Command - by OxygenBR - 14.01.2010, 16:37

Forum Jump:


Users browsing this thread: 2 Guest(s)