04.12.2015, 12:59
PHP код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_SUBMISSION)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
new engine, lights, alarms, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicle, engine, lights, alarms, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicle, (engine>0?0:1), lights, alarms, doors, bonnet, boot, objective);
}
}
return 1;
}