06.05.2017, 14:41
When i driving in my server..Suddenly the cars goes missing..For example when i taking a license test in a car..suddenly the car gone..and the license test fails..why is this happening..Help me
Let us know:
Are you destroying the cars somewhere in your script? (DestroyVehicle) How do you create the vehicles? Are you assigning cars to each player? give us some information so we can help you, else it's hopeless. |
DespawnVehicle(vehicleid, bool:save = true) { if(VehicleInfo[vehicleid][vID] > 0) { if(VehicleInfo[vehicleid][vNeonEnabled]) { DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][0]); DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][1]); } if(save) { new Float:health; GetVehicleHealth(vehicleid, health); SaveVehicleModifications(vehicleid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET fuel = %i, health = '%f' WHERE id = %i", vehicleFuel[vehicleid], health, VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); } DestroyVehicle(vehicleid); ResetVehicle(vehicleid); } }
public OnVehicleSpawn(vehicleid) { if(adminVehicle{vehicleid}) { DestroyVehicle(vehicleid); adminVehicle{vehicleid} = false; } if(IsValidDynamicObject(vehicleSiren[vehicleid])) { DestroyDynamicObject(vehicleSiren[vehicleid]); vehicleSiren[vehicleid] = INVALID_OBJECT_ID; } if((VehicleInfo[vehicleid][vID] > 0 && VehicleInfo[vehicleid][vOwnerID] > 0) || (VehicleInfo[vehicleid][vGang] >= 0)) { ReloadVehicle(vehicleid); if(VehicleInfo[vehicleid][vGang] >= 0) { vehicleFuel[vehicleid] = 100; } } else { if(VehicleInfo[vehicleid][vID] > 0 && VehicleInfo[vehicleid][vHealth] > 300.0) { SetVehicleHealth(vehicleid, VehicleInfo[vehicleid][vHealth]); } vehicleFuel[vehicleid] = 100; } vehicleStream[vehicleid][0] = 0; return 1; }
if(adminVehicle{vehicleid}) { DestroyVehicle(vehicleid); adminVehicle{vehicleid} = false; }
if((VehicleInfo[vehicleid][vID] > 0 && VehicleInfo[vehicleid][vOwnerID] > 0) || (VehicleInfo[vehicleid][vGang] >= 0))
if(VehicleInfo[vehicleid][vID] > 0 && VehicleInfo[vehicleid][vOwnerID] > 0 || VehicleInfo[vehicleid][vGang] >= 0)