SA-MP Forums Archive
Trucking Job, Bicycle bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Trucking Job, Bicycle bug (/showthread.php?tid=555683)



Trucking Job, Bicycle bug - FaZeRs - 08.01.2015

So when i get on bicycle i cant drive with it but i have set that when you get on bicycle Engine is on.

PHP код:
//OnPlayerEnterVehicle
    
if(engine == VEHICLE_PARAMS_UNSET) switch(GetVehicleModel(vehicleid)) {
        case 
509481510VehicleFuel[vehicleid] = 100arr_Engine{vehicleid} = 1SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
        default: 
SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_OFF,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective), arr_Engine{vehicleid} = 0;
    }
    new 
pveh GetVehicleModel(GetPlayerVehicleID(playerid));
    if(
pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509)
    {
        
arr_Engine{vehicleid} = 1;
        
GetVehicleParamsEx(pveh,engine,lights,alarm,doors,bonnet,boot,objective);
        
SetVehicleParamsEx(pveh1lights00000);
    }
//OnPlayerStateChange under     if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
        
new engine,lights,alarm,doors,bonnet,boot,objectivevehicleid;
        
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
        if(
GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 510)
        {
            
VehicleFuel[vehicleid] = 100;
            
arr_Engine{vehicleid} = 1;
            
SetVehicleParamsEx(vehicleid1lightsalarmdoorsbonnetbootobjective);
        } 
And when i take trucking job mission 26, county run and when i enter checkpoint it says i'm not in the banks car. ANd when i enter by feet it shows me not the right checkpoint to return.

Code http://pastebin.com/2sW4EE8u


Re: Trucking Job, Bicycle bug - Ciarannn - 08.01.2015

SetVehicleParamsEx

Quote:
vehicleid - The ID of the vehicle to set the parameters of.
engine - Engine status. 0 - Off, 1 - On.
lights - Light status 0 - Off, 1 - On.
alarm - Vehicle alarm status. If on, the alarm starts. 0 - Off, 1 - On.
doors - Door lock status. 0 - Unlocked, 1 - Locked.
bonnet - Bonnet (hood) status. 0 - Closed, 1 - Open.
boot - Boot/trunk status. 0 - Closed, 1 - Open.
objective - Toggle the objective arrow above the vehicle. 0 - Off, 1 - On.

I'm just guessing here, but trying using 1 and 0 to set the vehicle params instead of:

Quote:

SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_OFF,VE HICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective )




Re: Trucking Job, Bicycle bug - FaZeRs - 08.01.2015

I set params to 1 but nothing changed.