19.03.2015, 10:58
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if ((newkeys & KEY_LOOK_BEHIND) && !(oldkeys & KEY_LOOK_BEHIND)) if(EngineSTATE[vid] == 0) GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective); SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,al arm,doors,bonnet,boot,objective); EngineSTATE[vid] = 1; SendClientMessage(playerid, -1, "You have started the engine!"); } else { GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective); SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,a larm,doors,bonnet,boot,objective); EngineSTATE[vid] = 0; SendClientMessage(playerid, -1, "You have stopped the vehicle!"); return 1; }