28.05.2017, 21:51
PHP код:
if(strcmp(cmd, "/grampear", true) == 0 || strcmp(cmd, "/rastrear", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /grampear [ID/Nome]");
return true;
}
if(strcmp(tmp,"on",true)==0)
{
PlayerInfo[playerid][pGrampo] = INVALID_PLAYER_ID;
SendClientMessage(playerid, COLOR_GRAD1, "Vocк desligou a escuta");
return true;
}
giveplayerid = ReturnUser(tmp);
if(gTeam[playerid] == 2 || IsACop(playerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
PlayerInfo[playerid][pGrampo] = giveplayerid;
format(string, sizeof(string), "Vocк grampeou o Tefelone de %s.", PlayerName(giveplayerid));
SendClientMessage(playerid, COLOR_GREY, string);
SendClientMessage(playerid, COLOR_GRAD1, "Para desligar a escuta use: /grampear off");
}
else
{
format(string, sizeof(string), " %d nao e um jogador ativo.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return true;
}