Engine help
#1

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetVehicleModel(vid) == 481 || GetVehicleModel(vid) == 509 || GetVehicleModel(vid) == 510)
    {
        new vid = GetPlayerVehicleID(playerid);
        SetVehicleParamsEx(vid, 1, lights, alarm, doors, bonnet, boot, objective);
    }
    return 1;
}
I don't get any error or warning but it doesn't work.
Reply
#2

you need to retrieve the vehicle params first!
GetVehicleParamsEx
Reply
#3

Quote:
Originally Posted by park4bmx
Посмотреть сообщение
you need to retrieve the vehicle params first!
GetVehicleParamsEx
Still doesn't work.
Reply
#4

what did u do ?
edit
a quote from one of my old posts

Quote:
Originally Posted by park4bmx
Посмотреть сообщение
dont really know if vortex has this allredy :X
pawn Код:
//At the bottom , very bottom of the script just add this
stock VehicleEngine(vehicleid,VAR)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(VAR == 1)
    {
        VehEngineStat[vehicleid]=1;
        SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
    }else{
        VehEngineStat[vehicleid]=0;
        SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
    }
}
VehicleEngine(vehicleid,VAR)
vehicled is the vehicle's engine you want to taggle ON/OFF
VAR is the the ON/OFF fucntion, "TRUE" = ON , "FALSE" = OFF
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)