Vehicle Plate Help
#1

Hey guys.

I have tryed to get this working all this morning.
But i give up.

Код:
public AddCar(model,Float:x,Float:y,Float:z,Float:angle,color1,color2,delay,objective,doorslocked,vehicletype,materials,crack,pot,load,capasity,health,alarm,owned,nitro,paintjob,hydro,pimped,perma,rank,price)
{
	new FoundID = 0;
	new ID;
	new string[128];

    if(model > 399 && model < 612)
	{
		for ( new i = 1; FoundID <= 0 ; i++)
		{
		    format(string,sizeof(string),"vehicle/%i.ini",i);
		    if(!dini_Exists(string))
		    {
	 	   		ID = i;
	   	   		FoundID = 1;
		    }
		    if( i > MAX_DVEHICLES )
		    {
			    return true;
			}
		}
		format(string,sizeof(string),"vehicle/%i.ini",ID);
		dini_Create(string);
		dini_IntSet(string, "Model", model);
		dini_FloatSet(string, "X", x);
		dini_FloatSet(string, "Y", y);
		dini_FloatSet(string, "Z", z);
		dini_FloatSet(string, "Angle", angle);
		dini_IntSet(string, "Color1", color1);
		dini_IntSet(string, "Color2", color2);
		dini_IntSet(string, "Delay", delay);
		dini_IntSet(string, "Objective", objective);
		dini_IntSet(string, "DoorsLocked", doorslocked);
		dini_IntSet(string, "VehicleType", vehicletype);
		dini_IntSet(string, "VehicleMaterials", materials);
		dini_IntSet(string, "VehicleCrack", crack);
		dini_IntSet(string, "VehiclePot", pot);
		dini_IntSet(string, "VehicleLoad", load);
		dini_IntSet(string, "VehicleCapasity", capasity);
		dini_IntSet(string, "VehicleHealth", health);
		dini_IntSet(string, "VehicleAlarm", alarm);
		dini_IntSet(string, "VehicleOwned", owned);
		dini_IntSet(string, "Nitro", nitro);
		dini_IntSet(string, "PaintJob", paintjob);
		dini_IntSet(string, "Hydro", hydro);
		dini_IntSet(string, "Pimped", pimped);
		dini_IntSet(string, "Perma", perma);
		dini_IntSet(string, "Rank", rank);
	 	CarSystem[ID][cModel] = dini_Int(string, "Model");
	  	CarSystem[ID][cX] = x;
	   	CarSystem[ID][cY] = y;
	    CarSystem[ID][cZ] = z;
	    CarSystem[ID][cAngle] = angle;
	    CarSystem[ID][cColor1] = color1;
	    CarSystem[ID][cColor2] = color2;
	    CarSystem[ID][cDelay] = delay;
	    CarSystem[ID][cObjective] = objective;
	    CarSystem[ID][cDoorsLocked] = doorslocked;
	    CarSystem[ID][cVehicleType] = vehicletype;
	    CarSystem[ID][cVehicleMaterials] = materials;
	    CarSystem[ID][cVehicleCrack] = crack;
	    CarSystem[ID][cVehiclePot] = pot;
	    CarSystem[ID][cLoad] = load;
	    CarSystem[ID][cCapasity] = capasity;
	    CarSystem[ID][cVehicleHealth] = health;
	    CarSystem[ID][cVehicleAlarm] = alarm;
	    CarSystem[ID][cVehicleOwned] = owned;
	    CarSystem[ID][cNitro] = nitro;
	    CarSystem[ID][cPaintJob] = paintjob;
	    CarSystem[ID][cHydro] = hydro;
	    CarSystem[ID][cPimped] = pimped;
	    CarSystem[ID][cPerma] = perma;
	    CarSystem[ID][cRank] = rank;
	    CarSystem[ID][cPrice] = price;
	    CarSystem[ID][cFileID] = ID;
	    SetVehicleNumberPlate(CarSystem[ID][cFileID], CarSystem[ID][cPrice]);
	    CarSystem[ID][cVehicleID] = CreateVehicle(CarSystem[ID][cModel],CarSystem[ID][cX],CarSystem[ID][cY],CarSystem[ID][cZ],CarSystem[ID][cAngle],CarSystem[ID][cColor1],CarSystem[ID][cColor2], CarSystem[ID][cDelay]);
		CarCount ++;
	}
    else
    {//Invalid Model
        return true;
    }
	return ID;

}
Red: Here is the problem! I think, if the line are over the "CreateVehicle" it sould work. But no!
Blue: Im trying to set the plate to the price (Price is 1234) - If it works with the price i add the plate in the vehicle files
Green: Im my mind, then this is the "Filename" or the "VehicleID" No clue..

I want the plates to be integraded in my system, but it will not set my plates :/

I hope you guys can help me out here.
Reply


Messages In This Thread
Vehicle Plate Help - by Wulffe - 23.01.2011, 10:06
Re: Vehicle Plate Help - by Wulffe - 23.01.2011, 16:19
Re: Vehicle Plate Help - by Think - 23.01.2011, 16:21
Re: Vehicle Plate Help - by Wulffe - 23.01.2011, 16:24

Forum Jump:


Users browsing this thread: 1 Guest(s)