23.02.2015, 13:07
hello guys
How to make it like when someone is online the vehicles spawn( in my script) and that there stand: Car owner: "Ownername" Who can make that for me? Or explain it?
Car Data Code
Help me please
How to make it like when someone is online the vehicles spawn( in my script) and that there stand: Car owner: "Ownername" Who can make that for me? Or explain it?
Car Data Code
Код:
House_ReplaceVehicle(HouseID, CarSlot) { // Setup local variables new vid, cModel, cPaint, cComponents[14], Float:cx, Float:cy, Float:cz, Float:crot, Col1, Col2, Float:Health, cFuel; new panels, doors, lights, tires; // Get the data from the already existing vehicle that was parked before vid = AHouseData[HouseID][VehicleIDs][CarSlot]; cModel = AVehicleData[vid][Model]; cPaint = AVehicleData[vid][PaintJob]; cFuel = AVehicleData[vid][Fuel]; for (new i; i < 14; i++) cComponents[i] = AVehicleData[vid][Components][i]; Col1 = AVehicleData[vid][Color1]; Col2 = AVehicleData[vid][Color2]; cx = AVehicleData[vid][SpawnX]; cy = AVehicleData[vid][SpawnY]; cz = AVehicleData[vid][SpawnZ]; crot = AVehicleData[vid][SpawnRot]; GetVehicleHealth(vid, Health); GetVehicleDamageStatus(vid, panels, doors, lights, tires); // Delete the vehicle and clear the data Vehicle_Delete(vid); // Create a new vehicle in the same carslot vid = House_AddVehicle(HouseID, cModel, cPaint, cComponents, Float:cx, Float:cy, Float:cz, Float:crot, Col1, Col2); // Update the fuel of the vehicle to the previous setting AVehicleData[vid][Fuel] = cFuel; // Update the health to what it was before and update the bodywork SetVehicleHealth(vid, Health); UpdateVehicleDamageStatus(vid, panels, doors, lights, tires); return vid; }