How can I make the bikes 'engine' be turned on when they spawn/ respawn?
#1

Well the title says it all..
I've tried this under OnVehicle Spawn
pawn Код:
if(IsModelABycicle(vehicleid))
    {
        new engine,lights,alarm,doors,bonnet,boot,objective;
        GetVehicleParamsEx(GetPlayerVehicleID(vehicleid),engine,lights,alarm,doors,bonnet,boot,objective);
        SetVehicleParamsEx(GetPlayerVehicleID(vehicleid),VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
        engineOn[GetPlayerVehicleID(vehicleid)] = true;
        gEngine[vehicleid] = true;
        engineOn[vehicleid] = true;
        return 1;
    }
But no success..
Reply
#2

Do you have a stock or public named 'IsModelABycicle'?
Reply
#3

pawn Код:
public IsModelABycicle(carid)
{
    new modelid = GetVehicleModel(carid);
    if(modelid == 509 || modelid == 481 || modelid == 510)
    {
        return 1;
    }
    return 0;
}
Reply
#4

pawn Код:
if(IsModelABycicle(vehicleid))
    {
        new engine,lights,alarm,doors,bonnet,boot,objective;
        GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
        SetVehicleParamsEx(vehicleid,1,lights,alarm,doors,bonnet,boot,objective);
        engineOn[vehicleid] = true;
        gEngine[vehicleid] = true;
        engineOn[vehicleid] = true;
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)