[Pedido] Pq quando coloco pra prender o cara, quem vai preso sou eu?
#1

Pq quando coloco pra prender o cara, quem vai preso sou eu?

pawn Код:
if(strcmp(cmd, "/prender", true) == 0) {
if(prendeu[playerid] == -1) return SendClientMessage(playerid, Vermelho, "(ERRO) Aguarde 1 minuto para prender novamente!");
new prendeu;
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, "/prender [id]");
return 1;
}
if(!IsPlayerConnected(plid)){
SendClientMessage(playerid, Vermelho, "(ERRO) Jogador nгo conectado.");
return 1;
} else {
if(PlayerToPoint(8.0, playerid,1529.588623,-1677.564208,5.408386)){
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), "O policial %s te prendeu.", aname);
SendClientMessage(plid, Blue, string);
SetPlayerPos(playerid, 263.8351,78.6973,1001.0391);
SetPlayerInterior(playerid, 6);
SetPlayerHealth(plid, 99999);
dini_IntSet(file2, "Preso", 1);
dini_IntSet(file2, "Procurado", 0);
ResetPlayerWeapons(plid);
ClearAnimations(plid);
TogglePlayerControllable(plid,1);
RemovePlayerAttachedObject(plid, 4);
SetPlayerSpecialAction(plid, 0);
SetPlayerSpecialAction(plid,SPECIAL_ACTION_HANDSUP);
SendClientMessage(playerid, 0x8C8CFFAA, "(INFO) Preso com sucesso.");
format(string, sizeof(string),"[Corregedoria]O Policial %s(ID: %d) Prendeu ID: %d ", aname,playerid,plid);
SetTimerEx("Usou5", 60000, false, "d",playerid);
preso[plid] = 1;
algemado[plid] = 0;
Procurados[plid] = 0;
TogglePlayerControllable(plid, 1);
if(Procurados[plid] == 0){
dini_IntSet(file2, "Procurado", 0);
GivePlayerGrana(playerid,1500);
}
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(pornaviatura) e va ate a Dp para prende-lo!");
return 1;
}
}
} else {
SendClientMessage(playerid,Vermelho," Apenas Policiais podem fazer isso!");
return 1;
}
}
Reply
#2

SetPlayerPos(playerid, 263.8351,78.6973,1001.0391);
SetPlayerInterior(playerid, 6);

No Seu codigo playerid = VOCК plid = O RETARDADO QUE VAI SER PRESO.
Entгo vai ficar assim:

SetPlayerPos(plid , 263.8351,78.6973,1001.0391);
SetPlayerInterior(plid , 6);
Reply
#3

Simples ta trocado plid por playerid, como o tonisantolia explicou.
Reply
#4

Quote:
Originally Posted by Murilo_sousa
Посмотреть сообщение
Simples ta trocado plid por playerid, como o tonisantolia explicou.
com p playerid eu aparesзo na cadeia, mas quando coloco plid o player q vai ser preso vai pro ceu e fica caindo --', me ajduem pf,
Reply
#5

alguem me ajudaaaaa
Reply
#6

Quote:
Originally Posted by aldair8
Посмотреть сообщение
alguem me ajudaaaaa
Coloco o SetPlayerInterior com plid tbm?
Reply
#7

Quote:
Originally Posted by tonisantolia
Посмотреть сообщение
Coloco o SetPlayerInterior com plid tbm?
com o playerid eu q vo preso, mas vou direto pra cadeia, e com plid o preso vai pro ceu e fica caindo
Reply
#8

alguem?
Reply
#9

Soluзгo: Reversal Russa
Reply
#10

Troca

Код:
SetPlayerPos(playerid, 263.8351,78.6973,1001.0391);
SetPlayerInterior(playerid, 6);
Por
Код:
SetPlayerPos(plid, 263.8351,78.6973,1001.0391);
SetPlayerInterior(plid, 6);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)