21.02.2018, 20:16
Quote:
1. use fVehPosX fVehPosY etc. it is faster than multi dimensional.
2. Can you post the code of Vehicle_ResetData or have you checked the logs with the crashdetect plugin? |
PHP код:
Vehicle_ResetData(iVehicleID) {
if(GetVehicleModel(iVehicleID)) {
for(new cv = 0; cv < 6; cv++)
{
CrateVehicleLoad[iVehicleID][vCrateID][cv] = -1;
}
Vehicle_Armor(iVehicleID);
LockStatus{iVehicleID} = 0;
VehicleStatus{iVehicleID} = 0;
arr_Engine{iVehicleID} = 0;
stationidv[iVehicleID][0] = 0;
TruckContents{iVehicleID} = 0;
TruckDeliveringTo[iVehicleID] = INVALID_BUSINESS_ID;
VehicleFuel[iVehicleID] = 100.0;
if(LockStatus{iVehicleID}) {
foreach(new i: Player)
{
if(PlayerInfo[i][pLockCar] == iVehicleID) {
PlayerInfo[i][pLockCar] = INVALID_VEHICLE_ID;
}
}
}
if(VehicleBomb{iVehicleID} == 1) {
foreach(new i: Player)
{
if(PlacedVehicleBomb[i] == iVehicleID) {
VehicleBomb{iVehicleID} = 0;
PlacedVehicleBomb[i] = INVALID_VEHICLE_ID;
PickUpC4(i);
PlayerInfo[i][pC4Used] = 0;
PlayerInfo[i][pC4Get] = 1;
}
}
}
}
}