10.05.2011, 15:42
I've made a system that when you purchase a vehicle, you will be created a new dini file where the information is about your vehicle listed below:
OnPlayerLogin I've used the next line to make your vehicle spawn:
PlayerInfo[playerid][pStaticVehicle] is if you have a vehicle = 1 else 0.
Everything is perfect according to the printf messages I get in the command prompt, but the vehicle won't be created Ingame, I have no clue why not. Can somebody help me with this?
Код:
VehicleID=363 VehicleOwner=Berky_Brada VehX=1895.7 VehY=-1746.5 VehZ=13.2 VehicleAngle=89.8 LicensePlate=4456 VehColorOne=0 VehColorTwo=0 VehLocked=0
Код:
if(PlayerInfo[playerid][pStaticVehicle] == 1) { new berkycardealership[164]; OnPlayerVehicleLoad(playerid); HouseVehicleIDTemp[playerid] = CreateVehicle(CarInfo[playerid][vID],CarInfo[playerid][vVehX],CarInfo[playerid][vVehY],CarInfo[playerid][vVehZ],CarInfo[playerid][vAngle],CarInfo[playerid][vColorOne],CarInfo[playerid][vColorTwo], 900); // CarInfo[playerid][VehicleSpawn] = CreateVehicle(CarInfo[playerid][vID], CarInfo[playerid][vVehX], CarInfo[playerid][vVehY], CarInfo[playerid][vVehZ], CarInfo[playerid][vAngle], CarInfo[playerid][vColorOne], CarInfo[playerid][vColorTwo], 900); vehicle3Dtextdynamic[MAX_VEHICLES] = Create3DTextLabel(berkycardealership,COLOR_BIZ, CarInfo[playerid][vVehX],CarInfo[playerid][vVehY],CarInfo[playerid][vVehZ],20.0,0,1); Attach3DTextLabelToVehicle(vehicle3Dtextdynamic[MAX_VEHICLES], CarInfo[playerid][VehicleSpawn], 0.0, 0.0, -0.0); printf("LOGIN SPAWN, Info: ID: %d, X: %f, Y: %f, Z: %f, A: %f, ColorOne: %d, ColorTwo: %d.",CarInfo[playerid][vID], CarInfo[playerid][vVehX], CarInfo[playerid][vVehY], CarInfo[playerid][vVehZ], CarInfo[playerid][vAngle], CarInfo[playerid][vColorOne], CarInfo[playerid][vColorTwo]); }
Everything is perfect according to the printf messages I get in the command prompt, but the vehicle won't be created Ingame, I have no clue why not. Can somebody help me with this?