if(Preso[plid] == 0)
return SendClientMessage(playerid, Vermelho, "Este Player nao Esta Preso. ");
return 1;
warning 225: unreachable code
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];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "(ERRO) Use: /soltar [id]");
return 1;
}
plid = strval(tmp);
if(!IsPlayerConnected(plid)){
SendClientMessage(playerid, Vermelho, "(ERRO) O jogador nгo estб online");
return 1;
} else {
if(Preso[plid] == 0)
return SendClientMessage(playerid, Vermelho, "Este Player nao Esta Preso. ");
return 1;
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;
}
}
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 return SendClientMessage(playerid,Vermelho,"(ERRO) Vocк nгo й um Advogado");
return 1;
}
if(Preso[plid] == 1)
{
//Comando a Ser Feito
}
else if(Preso[plid] == 0)
{
SendClientMessage(playerid, Vermelho, "Este Player nao Esta Preso. "); // caso ele nao esteja preso
}
return 1;
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 !");
}
else return SendClientMessage(playerid,Vermelho,"(ERRO) Vocк nгo й um Advogado");
return 1;
}
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];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "(ERRO) Use: /soltar [id]");
return 1;
}
plid = strval(tmp);
if(!IsPlayerConnected(plid)){
SendClientMessage(playerid, Vermelho, "(ERRO) O jogador nгo estб online");
return 1;
}
plid = strval(tmp);
if(IsPlayerConnected(plid)){
if(Preso[plid] == 0)
SendClientMessage(playerid, Vermelho, "Este Player nao Esta Preso. ");
return 1;
}else {
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;
}
}
Nгo testei mas parece que funciona
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;
}
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];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "(ERRO) Use: /soltar [id]");
plid = strval(tmp);
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 true;
}
pawn Код:
|