12.01.2010, 18:37
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 ==. |
pawn Код:
#define TIME_PARAMEDICO 10
new gTeam[MAX_PLAYERS];
SetPlayerTeamFromClass(playerid, classid) {
if(classid == 0) {
gTeam[playerid] = TIME_PARAMEDICO;
}
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;
}
}