18.11.2013, 19:45
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (newkeys & KEY_LOOK_BEHIND && IsPlayerInAnyVehicle(playerid)) { new EngineStatus, lights, alarm, doors, bonnet, boot, objective; new vid = GetPlayerVehicleID(playerid); GetVehicleParamsEx(vid,EngineStatus,lights,alarm,doors,bonnet,boot,objective); if(vid != INVALID_VEHICLE_ID && EngineStatus== 0) { SetVehicleParamsEx(vid, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective); //engine started } else if(vid != INVALID_VEHICLE_ID && EngineStatus== 1) { SetVehicleParamsEx(vid, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective); //engine stopped } } return 1; }