new algemado[MAX_PLAYERS]= 0;
algemado[playerid] = 0;
if(strcmp(cmdtext, "/fianca", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
new grana;
grana = dini_Int(file, "SaldoBancario");
if(dini_Int(file, "Preso") == 1){
if(grana > 10000){
if(Preso[playerid]>= 2){
SetPlayerWantedLevel(playerid, 0);
Procurados[playerid] = 0;
dini_IntSet(file2, "Procurado", 0);
dini_IntSet(file, "Preso",0);
dini_IntSet(file, "SaldoBancario", dini_Int(file, "SaldoBancario")-Fianca);
preso[playerid] = 0;
Preso[playerid] = 0;
algemado[playerid] = 0;
SpawnPlayer(playerid);
SetPlayerHealth(playerid,100);
SendClientMessage(playerid, Verde,"(INFO) Vocк pagou a fianзa e foi solto!.");
} else {
SendClientMessage(playerid, Vermelho,"(ERRO) Vocк tem que esperar 2 minutos para poder pagar a fianзa!");
}
} else {
SendClientMessage(playerid, Vermelho,"(ERRO) Vocк nгo possui dinheiro suficiente! (R$10.000)");
}
} else {
SendClientMessage(playerid, Vermelho,"(ERRO) Vocк nгo estб preso!");
}
return 1;
}
algemado[plid]= 0;
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(dini_Int(file, "aAdmin") == 1 || dini_Int(file, "Profissao") == Advogado || dini_Int(file, "Profissao") == Presidente || dini_Int(file, "Profissao") == Prefeito || IsPlayerAdmin(playerid)){
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 {
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(NaFaculdade[playerid] == 1) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк estб na biblioteca e nгo pode usar nenhum comando.");
if(preso[playerid] == 1) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo pode usar nenhum comando Preso, Na biblioteca ou Algemado).");
if(algemado[playerid] == 1) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo pode usar nenhum comando (Preso, Na biblioteca ou Algemado).");
if(strcmp(cmd, "/algemar", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol ||dini_Int(file, "Profissao") == LSPD || dini_Int(file, "aAdmin") == 1){
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "(ERRO) Use: /algemar [id]");
return 1;
}
plid = strval(tmp);
if(IsPlayerInAnyVehicle(plid) == 1 || IsPlayerInAnyVehicle(playerid) == 1){
SendClientMessage(playerid, Vermelho, "(ERRO) Alguem estб dentro de um carro.");
return 1 ;
}
if(plid == playerid){
SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo pode algemar vocк mesmo.");
return 1 ;
}
if(!IsPlayerConnected(plid)){
SendClientMessage(playerid, Vermelho, "(ERRO) O jogador nгo estб conectado");
return 1;
} else {
if(GetDistanceBetweenPlayers(plid,playerid) < 10){
format(string, sizeof(string), "(INFO) O Policial %s te algemou.", aname);
SendClientMessage(plid, Blue, string);
TogglePlayerControllable(plid, 0);
SendClientMessage(playerid, COLOR_GREEN, "(INFO) Algemado com sucesso.");
algemado[plid] = 1;
return 1;
} else {
SendClientMessage(playerid,Vermelho,"(ERRO) Chegue mais perto para algemar.");
return 1;
}
}
} else {
SendClientMessage(playerid,Vermelho,"(ERRO) Apenas policiais podem usar este comando.");
return 1;
}
}
if(strcmp(cmd, "/desalgemar", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "Profissao") == LSPD || dini_Int(file, "aAdmin") == 1){
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "(ERRO) Use: /desalgemar [id]");
return 1;
}
plid = strval(tmp);
if(IsPlayerInAnyVehicle(plid) == 1 || IsPlayerInAnyVehicle(playerid) == 1){
SendClientMessage(playerid, Vermelho, "(ERRO) Alguem estб dentro de um carro.");
return 1 ;
}
if(plid == playerid){
SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo pode tirar algemas de vocк mesmo.");
return 1 ;
}
if(!IsPlayerConnected(plid)){
SendClientMessage(playerid, Vermelho, "(ERRO) O jogador nгo estб conectado");
return 1;
} else {
if(GetDistanceBetweenPlayers(plid,playerid) < 10){
format(string, sizeof(string), "(INFO) O Policial %s te desalgemou.", aname);
SendClientMessage(plid, Blue, string);
TogglePlayerControllable(plid, 1);
SendClientMessage(playerid, COLOR_GREEN, "(INFO) Desalgemado com sucesso.");
algemado[plid] = 0;
return 1;
} else {
SendClientMessage(playerid,Vermelho,"(INFO) Chegue mais perto para desalgemar.");
return 1;
}
}
} else {
SendClientMessage(playerid,Vermelho,"(INFO) Apenas policiais podem usar este comando.");
return 1;
}
}
if(strcmp(cmd, "/prender", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == LSPD || dini_Int(file, "aAdmin") == 1){
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "(ERRO) Use: /prender [id]");
return 1;
}
plid = strval(tmp);
if(IsPlayerInAnyVehicle(plid) == 1 || IsPlayerInAnyVehicle(playerid) == 1){
SendClientMessage(playerid, Vermelho, "(ERRO) Alguem estб dentro de um carro.");
return 1 ;
}
if(plid == playerid){
SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo pode fazer isto com si mesmo.");
return 1 ;
}
if(!IsPlayerConnected(plid)){
SendClientMessage(playerid, Vermelho, "(ERRO) O jogador nгo estб conectado");
return 1;
} else {
if(GetDistanceBetweenPlayers(plid,playerid) < 10){
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
format(string, sizeof(string), "(INFO) O Policial %s te prendeu.", aname);
SendClientMessage(plid, Blue, string);
SetPlayerPos(plid, 263.8820,77.4002,1001.0391);
SetPlayerInterior(plid, 6);
SetPlayerHealth(plid, 99999);
ResetPlayerWeapons(plid);
dini_IntSet(file2, "Preso", 1);
SendClientMessage(playerid, COLOR_GREEN, "(INFO) Preso com sucesso.");
SetPlayerWantedLevel(plid, 0);
preso[plid] = 1;
TogglePlayerControllable(plid, 1);
if(Procurados[plid] == 1){
GivePlayerGrana(playerid,5000);
Procurados[plid] = 0;
SendClientMessage(playerid, Verde, "(INFO) Vocк prendeu um jogador procurado e ganhou 5 mil!");
dini_IntSet(file2, "Procurado", 0);
}
return 1;
} else {
SendClientMessage(playerid,Vermelho,"(ERRO) Chegue mais perto para prender!");
return 1;
}
}
} else {
SendClientMessage(playerid,Vermelho,"(ERRO) Apenas policiais podem usar este comando!");
return 1;
}
}
algemado[playerid]=0;
algemado[playerid] = 0;
if(dini_Int(file2, "DM") == 1){
new string[256];
format(string, sizeof(string), "(INFO) %s matou o jogador %s e esta sendo procurado!",kname, aname);
SendClientMessageToAll(msgdm3, string);
SendClientMessage(killerid, msgdm, "(INFO) Vocк estб sendo procurado por assasinato!");
SetPlayerWantedLevel(playerid, 6);
dini_IntSet(file, "Procurado", 1);
Procurados[playerid]= 1;
Procurados[killerid] = 1;
}
return 1;
}
if(strcmp(cmdtext, "/procurados", true) == 0){
SendClientMessage(playerid,0x008000AA,".:: Procurados ::.");
new Jogador[24];
new count = 0;
new msg[120];
for(new i=0; i<MAX_PLAYERS; i++){
if(IsPlayerConnected(i) && Procurados[i]){
GetPlayerName(i,Jogador,24);
format(msg,sizeof(msg),"%s (ID: %d)", Jogador,i);
SendClientMessage(playerid, 0x0088CAAA, msg);
count++;
}
}
if(count == 0){
SendClientMessage(playerid, 0xFF0000AA, "Ninguйm online esta Procurado!");
}
return 1;
}
if(strcmp(cmdtext, "/procurados", true) == 0)
{
SendClientMessage(playerid,0x008000AA,".:: Procurados ::.");
new Jogador[24];
new count = 0;
new msg[120];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && Procurados[i] >= 1)
{
GetPlayerName(i,Jogador,24);
format(msg,sizeof(msg),"%s (ID: %d)", Jogador,i);
SendClientMessage(playerid, 0x0088CAAA, msg);
count++;
}
}
if(count == 0){ SendClientMessage(playerid, 0xFF0000AA, "Ninguйm online esta Procurado!");}
return 1;
}
|
pawn Код:
This forum requires that you wait 120 seconds between posts. Please try again in 10 seconds. |
if(dini_Int(file2, "DM") == 1){
new string[256];
format(string, sizeof(string), "(INFO) %s matou o jogador %s e esta sendo procurado!",kname, aname);
SendClientMessageToAll(msgdm3, string);
SendClientMessage(killerid, msgdm, "(INFO) Vocк estб sendo procurado por assasinato!");
SetPlayerWantedLevel(killerid, 6);
dini_IntSet(file, "Procurado", 1);
Procurados[killerid] = 1;
}
return 1;
}
|
troca la no seu OnPlayerDeath,
pawn Код:
|