07.08.2013, 19:15
(
Последний раз редактировалось thimo; 07.08.2013 в 19:47.
)
Hello, for some reason when i spawn my car it just doesnt put on the color. On a feltzer i modded my car to be yellow. I relogged instead of the body being yellow the interior was yellow why in the bloody hell does that happen?
This is my code to add the vehicle to the house it belongs to.
This is my code to add the vehicle to the house it belongs to.
pawn Код:
House_AddVehicle(HouseID, cModel, Float:cx, Float:cy, Float:cz, Float:crot, Col1, Col2, CarID, playerid)
{
new vid, CarSlot, pName[MAX_PLAYER_NAME];//, string2[128];
GetPlayerName(playerid, pName, sizeof(pName));
CarSlot = House_GetFreeCarSlot(HouseID);
printf("House_AddVehicle::CarSlot = %d", CarSlot);
if (CarSlot != -1)
{
vid = Vehicle_Create(cModel, cx, cy, cz, crot, Col1, Col2, 600);
printf("House_AddVehicle::vid= %d", vid);
AHouseData[HouseID][VehicleIDs][CarSlot] = vid;
printf("House_AddVehicle::AHouseData[%d][VehicleIDs][%d]= %d", HouseID, CarSlot, AHouseData[HouseID][VehicleIDs][CarSlot]);
AVehicleData[vid][CarModel] = cModel;
AVehicleData[AHouseData[HouseID][VehicleIDs][CarSlot]][SaveID] = CarID;
// Save the spawn-data of the vehicle
AVehicleData[vid][SpawnX] = cx;
AVehicleData[vid][SpawnY] = cy;
AVehicleData[vid][SpawnZ] = cz;
AVehicleData[vid][SpawnRot] = crot;
AVehicleData[vid][Color1] = Col1;
AVehicleData[vid][Color2] = Col2;
// Also set the fuel to maximum
AVehicleData[vid][FuelData] = MaxFuel;
// Also set the owner
AVehicleData[vid][Owned] = true;
format(AVehicleData[vid][Owner], 24, pName);
// Save the HouseID for the vehicle
AVehicleData[vid][BelongsToHouse] = HouseID;
print("Vehicle loaded");
}
else
{
print ("No free carslot");// No free carslot was found, return 0
return 0;
}
// Exit the function and return the vehicle-id
return vid;
}