pawn Код:
if(strcmp(tmp, "trancar", true) == 0)
{
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0) return SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem um Carro VIP.");
if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid) return SendClientMessage(playerid, COLOR_GREY, "Esse nгo й seu Carro VIP.");
new keycar;
if(vehid == PlayerInfo[playerid][pCarKey]) keycar = PlayerInfo[playerid][pVeiculo];
else if(vehid == PlayerInfo[playerid][pCarKey2]) keycar = PlayerInfo[playerid][pVeiculo2];
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
new Pecas[7];
GetVehicleParamsEx(CarInfo[keycar][ownedvehicle], Pecas[0], Pecas[1], Pecas[2], Pecas[3], Pecas[4], Pecas[5], Pecas[6]);
if(CarInfo[keycar][cLock] == 1)
{
SetVehicleParamsEx(CarInfo[keycar][ownedvehicle], Pecas[0], Pecas[1], Pecas[2], false, Pecas[4], Pecas[5], Pecas[6]);
GameTextForPlayer(playerid, "~w~Veiculo VIP~n~~g~Aberto", 10000, 3);
CarInfo[keycar][cLock] = 0;
}
else
{
SetVehicleParamsEx(CarInfo[keycar][ownedvehicle], Pecas[0], Pecas[1], Pecas[2], true, Pecas[4], Pecas[5], Pecas[6]);
GameTextForPlayer(playerid, "~w~Veiculo VIP~n~~r~Trancado", 10000, 3);
CarInfo[keycar][cLock] = 1;
}
return true;
}
.