18.10.2013, 00:11
Tipo, Queria Por Para Prender Com Veiculos De Uma Org Da Policia Como Fazeria Para Acrescenta-los ?
Sultans, Patriots, E Fbi .
Code De Prender :
E O Vid Dos Carros .
Sultans, Patriots, E Fbi .
Code De Prender :
Код:
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") == Policia_Militar || dini_Int(file, "Profissao") == Policia_Civil || dini_Int(file, "Profissao") == Policia_Federal || 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, "aAdmin") == 1){
new plid;
new id = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "/prender [id]");
return 1;
}
if(!IsPlayerConnected(plid)){
plid = strval(tmp);
if(plid == playerid){
SendClientMessage(playerid, Vermelho, "| ERRO | Você não pode usar este comando em você mesmo.");
return 1 ;
}
SendClientMessage(playerid, Vermelho, "(ERRO) Jogador não conectado.");
return 1;
} else {
if(PlayerToPoint(2.0, playerid,1560.0999755859,-1635.5,12.60000038147)){
plid = strval(tmp);
if(GetPlayerVehicleID(playerid) == GetPlayerVehicleID(plid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
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, Azul, string);
SetPlayerPos(plid, 263.8820,77.4002,1001.0391);
SetPlayerInterior(plid,6);
SetPlayerHealth(plid, 99999);
dini_IntSet(file2, "Preso", 1);
dini_IntSet(file2, "Procurados", 0);
ResetPlayerWeapons(plid);
ClearAnimations(plid);
TogglePlayerControllable(plid,1);
SetPlayerSpecialAction(plid,0);
SendClientMessage(playerid, VerdeClaro, "| INFO | Voce Prendeu o Procurado Pela Justiça e Ganhou 1300!");
Preso[playerid] = 1;
preso[plid] = 1;
Algemado[id] = false;
Procurados[plid] = 0;
SetPlayerWantedLevel(id, 0);
TogglePlayerControllable(plid, 1);
if(Procurados[plid] == 0){
dini_IntSet(file2, "Procurados", 0);
GivePlayerGrana(playerid,1300);
GetPlayerName(plid,pname,MAX_PLAYER_NAME);
format(string, sizeof(string),"[Corregedoria]O Policial %s(ID: %d) Prendeu %s(ID: %d)", aname,playerid,pname,plid);
Comandosp(Roxo,string,1);
}
return 1;
} else {
SendClientMessage(playerid,Vermelho," O jogador não esta no seu veiculo ou você não esta nele!");
return 1;
}
} else {
SendClientMessage(playerid,Vermelho,"Coloque-o na viatura(/vozdeprisao) e va ate a Dp para prende-lo!");
return 1;
}
}
} else {
SendClientMessage(playerid,Vermelho," Apenas Policiais podem fazer isso!");
return 1;
}
}
Код:
if(vid == VeiculosBTP[0] || vid == VeiculosBTP[1] || vid == VeiculosBTP[2] || vid == VeiculosBTP[3] || vid == VeiculosBTP[4] || vid == VeiculosBTP[5] || vid == VeiculosBTP[6] || vid == VeiculosBTP[7] || vid == VeiculosBTP[8] || vid == VeiculosBTP[9] || vid == VeiculosBTP[10] || vid == VeiculosBTP[11]){
if(PlayerInfo[playerid][pBTPS] || PlayerInfo[playerid][pBTPT] || PlayerInfo[playerid][pBTPC] || PlayerInfo[playerid][pBTPM] || PlayerInfo[playerid][pBTPCO]) {
SendClientMessage(playerid, Roxo,"Bem Vindo Ao Veiculo Da BTP !");
} else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, Vermelho, "Esse Veiculo É Reservado Para Membros Da BTP!");
}
}


