22.12.2010, 23:38
Dear SA-MP users,
I'm trying to make a /spawncar for this public but I don't really know how to make it. Can anyone help me with making this?
This is my public:
I hope someone can help me with this!
Regards,
Joeri
I'm trying to make a /spawncar for this public but I don't really know how to make it. Can anyone help me with making this?
This is my public:
Код:
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; 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; }
Regards,
Joeri