06.04.2013, 18:43
Qria q esse comando so pudesse ser usado perto do veiculo
pawn Код:
if(strcmp(cmd, "/carroprender", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new playa;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /apreendercarro [carid]");
return 1;
}
if(!IsARebocadores(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й um policial!");
return 1;
}
else
{
new carid = strval(tmp);
VTrancado[carid] = 1; // linha 41569
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetVehicleParamsForPlayer(carid, i, 0, 1);
}
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Policial Federal: %s Prendeu o Carro id {FF34B3}[%d]", PlayerName(playerid),carid);
SendClientMessageToAll(COLOR_LIGHTRED, string);
SendClientMessage(playerid, COLOR_WHITE, "[Info] Veнculo apreendido.");
}
}
return 1;
}
pawn Код:
if(strcmp(cmd, "/liberarcarro", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new playa;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /liberarcarro [carid]");
return 1;
}
if(!IsARebocadores(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й um policial!");
return 1;
}
else
{
new carid = strval(tmp);
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetVehicleParamsForPlayer(carid, i, 0, 0);
}
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Policial Federal: %s Liberou o Carro id {FF34B3}[%d]", PlayerName(playerid),carid);
SendClientMessageToAll(COLOR_LIGHTRED, string);
VTrancado[carid] = 1; // ultima linha 41602
SendClientMessage(playerid, COLOR_WHITE, "[Info] Veнculo liberado.");
}
}
return 1;
}