player in each specific vehicle
#1

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

Код:
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;
}
any idea or the code in not optimized?
Reply


Messages In This Thread
player in each specific vehicle - by Mobtiesgangsa - 20.10.2018, 00:03
Re: player in each specific vehicle - by GTLS - 21.10.2018, 09:41
Re: player in each specific vehicle - by KinderClans - 21.10.2018, 10:26
Re: player in each specific vehicle - by kristo - 21.10.2018, 17:46
Re: player in each specific vehicle - by GTLS - 23.10.2018, 14:29
Re: player in each specific vehicle - by Mobtiesgangsa - 23.10.2018, 15:04
Re: player in each specific vehicle - by kristo - 23.10.2018, 21:29
Re: player in each specific vehicle - by sammp - 24.10.2018, 00:44

Forum Jump:


Users browsing this thread: 1 Guest(s)