Server Crashes. Rep+ !
#5

pawn Code:
for(new i = 0; i < sizeof(FamilyInfo); i++)
{
    for(new d = 0 ; d < MAX_GANG_VEHICLES; d++)
    {
        if(FamilyVehicleInfo[i][d][fvLocked] != 0 && FamilyVehicleInfo[i][d][fvLock] > 0)
        {
            LockGangVehicle(i, FamilyVehicleInfo[i][d][fvId], FamilyVehicleInfo[i][d][fvLock]);
        }
    }
}
FamilyVehicleInfo[i][d][fvId] is INVALID_VEHICLE_ID. You could check if it's not before calling LockGangVehicle:
pawn Code:
if(FamilyVehicleInfo[i][d][fvLocked] != 0 && FamilyVehicleInfo[i][d][fvLock] > 0 && FamilyVehicleInfo[i][d][fvId] != INVALID_VEHICLE_ID)
or in case the reset value is changed to be more accurate:
pawn Code:
if(FamilyVehicleInfo[i][d][fvLocked] != 0 && FamilyVehicleInfo[i][d][fvLock] > 0 && 1 <= FamilyVehicleInfo[i][d][fvId] <= 1999)
That will prevent the run time error from OnPlayerSpawn but if LockGangVehicle is called elsewhere and carid is still a valid, you'll need to modify that function as well.
Reply


Messages In This Thread
Server Crashes. Rep+ ! - by stylehaziq01 - 04.06.2015, 06:10
Re: Server Crashes. Rep+ ! - by mamorunl - 04.06.2015, 07:54
Re: Server Crashes. Rep+ ! - by Konstantinos - 04.06.2015, 11:13
Re: Server Crashes. Rep+ ! - by stylehaziq01 - 05.06.2015, 09:24
Re: Server Crashes. Rep+ ! - by Konstantinos - 05.06.2015, 09:32
Re: Server Crashes. Rep+ ! - by stylehaziq01 - 05.06.2015, 09:50
Re: Server Crashes. Rep+ ! - by Konstantinos - 05.06.2015, 10:05
Re: Server Crashes. Rep+ ! - by stylehaziq01 - 05.06.2015, 10:10
Re: Server Crashes. Rep+ ! - by Konstantinos - 05.06.2015, 10:17

Forum Jump:


Users browsing this thread: 1 Guest(s)