28.07.2012, 17:29
Estou com um problema aki.
meu comando /soltar esta bugado. Ele esta soltando atй os players q nao estao presos.
Eu coloquei isso isso aki dai :
mas esta dando uma warning.
aki esta o comando de soltar:
Eu estou achando q esta faltando algo . Pq eu acho q esta no lugar certo.
Me Ajudem.
meu comando /soltar esta bugado. Ele esta soltando atй os players q nao estao presos.
Eu coloquei isso isso aki dai :
pawn Код:
if(Preso[plid] == 0)
return SendClientMessage(playerid, Vermelho, "Este Player nao Esta Preso. ");
return 1;
pawn Код:
warning 225: unreachable code
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];
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;
}
}
Me Ajudem.