24.10.2015, 10:45
PHP код:
else if(!strcmp(params, "park", true, 4))
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_LIGHTRED, "You are not inside any vehicle.");
new vehicleid = GetPlayerVehicleID(playerid);
new id = GetVehicleID(vehicleid);
if(GetPlayerVehicleAccess(playerid, id) < 1)
return SendClientMessage(playerid, COLOR_LIGHTRED, "You don't have the keys for this vehicle.");
new Float:x, Float:y, Float:z,Float:carhealth;
GetPlayerPos(playerid, x, y, z);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 0, 0, 0, 0, 0, 0, 0);
GetVehicleHealth(id, carhealth);
VehicleHealth[id] = carhealth;
GetVehiclePos(VehicleID[id], VehiclePos[id][0], VehiclePos[id][1], VehiclePos[id][2]);
GetVehicleZAngle(VehicleID[id], VehiclePos[id][3]);
VehicleInterior[id] = GetPlayerInterior(playerid);
VehicleWorld[id] = 100;
SaveVehicle(id);