Whole system wrote by myself for my own GM...
pawn Код:
new engine, lights, alarm, doors, bonnet, boot, objective;
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new vid = GetPlayerVehicleID(playerid);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, 0xFF00CC, "Use /ste to start the vehicle engine.");
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
new vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,false,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, 0xFF00CC, "You turned the engine off.");
return 1;
}
COMMAND:ste(playerid, param[])
{
new vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,true,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, 0xFF00CC, "Engine Started. Use /spe to turn the vehicle engine off again.");
return 1;
}
COMMAND:spe(playerid, param[])
{
new vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,false,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, 0xFF00CC, "Engine Stoped. Use /ste to turn the vehicle engine on again.");
return 1;
}