if(strcmp(cmd, "/tirarpres", true) == 0) { new aname[MAX_PLAYER_NAME]; GetPlayerName(playerid, aname, MAX_PLAYER_NAME); format(file, sizeof(file), PASTA_CONTAS, aname); if(LevelAdmin[playerid] == 4){ new tmp[256]; new plid; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, Vermelho, "/tirarpres [ID PLAYER]"); return 1; } plid = strval(tmp); if(IsPlayerConnected(plid)){ new sstring[256]; new pname[MAX_PLAYER_NAME]; GetPlayerName(plid, pname, MAX_PLAYER_NAME); format(sstring, sizeof(sstring), "-| Vocк tirou o cargo de presidente do jogador %s (ID: %d)! |-", pname,plid); SendClientMessage(playerid,0x0080FFAA, sstring); dini_IntSet(file, "Presidente", 0); }else{ SendClientMessage(playerid, Vermelho, "(ERRO) ID invбlido"); return 1; } } return 1; }
Quando |
if(strcmp(cmd, "/tirarpres", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(LevelAdmin[playerid] == 4)
{
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, Vermelho, "/tirarpres [ID PLAYER]");
plid = strval(tmp);
if(IsPlayerConnected(plid))
{
if(dini_Int(file, "Presidente") == 0)
return SendClientMessage(playerid, -1, "O jogador nгo й presidente!");
new sstring[256];
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(sstring, sizeof(sstring), "-| Vocк tirou o cargo de presidente do jogador %s (ID: %d)! |-", pname,plid);
SendClientMessage(playerid,0x0080FFAA, sstring);
dini_IntSet(file, "Presidente", 0);
}
else return SendClientMessage(playerid, Vermelho, "(ERRO) ID invбlido");
}
return 1;
}