07.10.2013, 17:24
So there warning is at the line Vehicle_Armor{iVehicleID}; when I am removing it it's fine. Any way to fix it?
And that's how the Vehicle_Armor is created
pawn Код:
Vehicle_ResetData(iVehicleID) {
if(GetVehicleModel(iVehicleID)) {
for(new cv = 0; cv < 6; cv++)
{
CrateVehicleLoad[iVehicleID][vCrateID][cv] = -1;
}
LockStatus{iVehicleID} = 0;
VehicleStatus{iVehicleID} = 0;
arr_Engine{iVehicleID} = 0;
TruckContents{iVehicleID} = 0;
Vehicle_Armor(iVehicleID); //Warning is in this line, when I am removing this warning is getting removed.
VehicleFuel[iVehicleID] = 100.0;
if(LockStatus{iVehicleID}) foreach(Player, i) if(PlayerInfo[i][pLockCar] == iVehicleID) {
PlayerInfo[i][pLockCar] = INVALID_VEHICLE_ID;
}
if(VehicleBomb{iVehicleID} == 1) foreach(Player, i) if(PlacedVehicleBomb[i] == iVehicleID) {
VehicleBomb{iVehicleID} = 0;
PlacedVehicleBomb[i] = INVALID_VEHICLE_ID;
PickUpC4(i);
PlayerInfo[i][pC4Used] = 0;
PlayerInfo[i][pC4Get] = 1;
}
}
}
pawn Код:
Vehicle_Armor(iVehicleID) {
switch(GetVehicleModel(iVehicleID)) {
case 407, 416, 490, 497, 544, 552, 596, 597, 598, 599: SetVehicleHealth(iVehicleID, 2000.0);
case 447, 470: SetVehicleHealth(iVehicleID, 3000.0);
case 427, 428, 433, 502, 601, 476, 548, 563: SetVehicleHealth(iVehicleID, 4000.0);
case 425, 432, 520, 592: SetVehicleHealth(iVehicleID, 6000.0);
}
}