28.07.2012, 18:06
pawn Код:
if(strcmp(cmd, "/soltar", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || dini_Int(file, "Profissao") == Prefeito || dini_Int(file, "Profissao") == Presidente || dini_Int(file, "Profissao") == Guardiao || dini_Int(file, "Profissao") == Advogado || pAdmin[playerid] == 5)
{
new tmp[256],plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, Vermelho, "(ERRO) Use: /soltar [id]");
plid = strval(tmp);
if(!IsPlayerConnected(plid)) return SendClientMessage(playerid, Vermelho, "(ERRO) O jogador nгo estб online");
if(Preso[plid] == 0) return SendClientMessage(playerid, Vermelho, "Este Player nao Esta Preso. ");
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
SendClientMessage(plid, Aviso, string);
dini_IntSet(file2, "Preso", 0);
preso[plid] = 0;
SetPlayerHealth(plid,100);
Preso[plid] = 0;
algemado[plid] = 0;
SpawnPlayer(plid);
SendClientMessage(playerid, COLOR_GREEN, "(INFO) Jogador Solto !");
return 1;
}
else SendClientMessage(playerid,Vermelho,"(ERRO) Vocк nгo й um Advogado");
return 1;
}

