08.07.2017, 07:48
Quote:
|
i am trying to add Vip system but the vip vehicle does not have fuel in it what to do ??
|
Code:
Vehicle_AddStatic(vModel, Float:vX, Float:vY, Float:vZ, Float:vRotation, vC1, vC2, vSpawnDelay)
{
// Create a new static vehicle during GameModeInit
new vid = AddStaticVehicleEx(vModel, vX, vY, vZ, vRotation, vC1, vC2, vSpawnDelay);
// Save the vehicle-model
AVehicleData[vid][Model] = vModel;
// Set the fuel to maximum so the vehicle can be used
AVehicleData[vid][Fuel] = MaxFuel;
// Save the colors
AVehicleData[vid][Color1] = vC1;
AVehicleData[vid][Color2] = vC2;
// Set this vehicle as a static vehicle
AVehicleData[vid][StaticVehicle] = true;
return vid;
}
// This function is the same as Vehicle_AddStatic, but uses CreateVehicle instead of AddStaticVehicleEx, so can be used everywhere
Vehicle_Create(vModel, Float:vX, Float:vY, Float:vZ, Float:vRotation, vC1, vC2, vSpawnDelay)
{
// Create a new static vehicle during GameModeInit
new vid = CreateVehicle(vModel, vX, vY, vZ, vRotation, vC1, vC2, vSpawnDelay);
// Save the vehicle-model
AVehicleData[vid][Model] = vModel;
// Set the fuel to maximum so the vehicle can be used
AVehicleData[vid][Fuel] = MaxFuel;
// Save the colors
AVehicleData[vid][Color1] = vC1;
AVehicleData[vid][Color2] = vC2;
return vid;
}


