SA-MP Forums Archive
Bike 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: Bike bug. (/showthread.php?tid=555095)



Bike bug. - FaZeRs - 06.01.2015

So noone is able to drive with a bike

PHP код:
    new engine,lights,alarm,doors,bonnet,boot,objective;
    
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
    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;
    } 
I have added this but it still doesnt work


Re: Bike bug. - Sid_Alexander - 06.01.2015

You want players to avoid using bikes?


Re: Bike bug. - FaZeRs - 06.01.2015

No i want players to use bikes.


Re: Bike bug. - Sid_Alexander - 06.01.2015

Quote:
Originally Posted by FaZeRs
Посмотреть сообщение
No i want players to use bikes.
I don't know, The code doesn't make sense, What does the code mean? That's a vehicle fuel and engine system for all vehicles, And you want to make it only for motor vehicles and not bikes, Correct?


Re: Bike bug. - FaZeRs - 06.01.2015

I have put this code under it

PHP код:
    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);
    } 
With Bike i mean Bicycle


Re: Bike bug. - Sid_Alexander - 06.01.2015

That will automatically turn the bike params engine to on, So you don't want them to do /engine on bicycle?


Re: Bike bug. - FaZeRs - 06.01.2015

Yes. But it doesnt work.


Re: Bike bug. - Sid_Alexander - 06.01.2015

Modify this with your codes

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
        {
            new engine,lights,alarm,doors,bonnet,boot,objective, vehicleid;
            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(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
                    }
        }
    return 1;
}



Re: Bike bug. - FaZeRs - 06.01.2015

It didnt work


Re: Bike bug. - FaZeRs - 07.01.2015

BUMP