09.10.2012, 16:45
I suppose you have something like this in your script:
Now the case is that when something is wrong (invalid model ID, server full of vehicles), the CreateVehicle native returns INVALID_VEHICLE_ID (65535).
You need to add a safety guard for this:
pawn Код:
new id = CreateVehicle(...);
some_array[id] = ...;
You need to add a safety guard for this:
pawn Код:
new id = CreateVehicle(...);
if(id != INVALID_VEHICLE_ID)
{
// continue
}