20.10.2018, 00:03
Is there any alternative way to do this for accessable vehicles
when enter on any 4 wheeled car engine and lights off
when enter on bicycle engine on others off?
for some type of vehicles if they dont have trunk and\or hood to be unset
any idea or the code in not optimized?
when enter on any 4 wheeled car engine and lights off
when enter on bicycle engine on others off?
for some type of vehicles if they dont have trunk and\or hood to be unset
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { new vehicleid = GetPlayerVehicleID(playerid); GetVehicleParamsEx(vehicleid, engine_state[vehicleid], lights_state[vehicleid], alarm_state[vehicleid], doors_state[vehicleid], bonnet_state[vehicleid], boot_state[vehicleid], objective_state[vehicleid] ); if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) { switch(IsPlayerInVehicle(playerid, vehicleid)) { case 400: SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF); .. } } return 1; }