25.06.2014, 21:58
Like the title say..
Right now you must /engine the bicycle which is kinda weird.. So I'm wondering how I can make it so they are allways on?
Here is my OnVehicleSpawn..
Right now you must /engine the bicycle which is kinda weird.. So I'm wondering how I can make it so they are allways on?
Here is my OnVehicleSpawn..
pawn Код:
public OnVehicleSpawn(vehicleid)
{
new string[64];
if(IsAnOwnableCar(vehicleid))
{
if(CarInfo[vehicleid][cPaintjob] != 999)
{
ChangeVehiclePaintjob(vehicleid, CarInfo[vehicleid][cPaintjob]);
}
SetVehicleModifications(vehicleid);
SetVehicleVirtualWorld(vehicleid, CarInfo[vehicleid][cVirWorld]);
new reg = CarInfo[vehicleid][cReg];
format(string, sizeof(string),"{157DEC}LS{FF0000}-%d-",reg);
SetVehicleNumberPlate(vehicleid, string);
SetVehicleToRespawn(vehicleid);
}
if(IsARentableVeh(vehicleid))
{
Gas[vehicleid] = 10;
}
if(IsACopCar(vehicleid))
{
format(string, sizeof(string),"UNIT %d",vehicleid);
//SetVehicleToRespawn(vehicleid);
SetVehicleNumberPlate(vehicleid, string);
//SetVehicleToRespawn(vehicleid);
}
if(IsNgCar(vehicleid))
{
format(string, sizeof(string),"NG %d",vehicleid);
//SetVehicleToRespawn(vehicleid);
SetVehicleNumberPlate(vehicleid, string);
// SetVehicleToRespawn(vehicleid);
}
if(IsAGovernmentCar(vehicleid))
{
format(string, sizeof(string),"GOV %d",vehicleid);
//SetVehicleToRespawn(vehicleid);
SetVehicleNumberPlate(vehicleid, string);
//SetVehicleToRespawn(vehicleid);
}
if(IsASalesVehicle(vehicleid))
{
format(string, sizeof(string),"{FF0000}FOR SALE");
//SetVehicleToRespawn(vehicleid);
SetVehicleNumberPlate(vehicleid, string);
//SetVehicleToRespawn(vehicleid);
}
gEngine[vehicleid] = 0;
engineOn[vehicleid] = 0;
if(IsModelABycicle(vehicleid))
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
engineOn[vehicleid] = true;
gEngine[vehicleid] = true;
engineOn[vehicleid] = true;
RestartCar(vehicleid);
return 1;
}
return 1;
}