19.01.2014, 14:30
That depends on you. What do you want to do if CurrentHouse of a player is -1? Return an error for something (again, it depends on you and how you scripted it) or if you don't want to do anything, just check if it's not -1 and do your code.
An example for the last:
An example for the last:
pawn Код:
if (HouseID != -1)
{
for (CarSlot = 0; CarSlot < 20; CarSlot++)
if (AHouseData[HouseID][VehicleIDs][CarSlot] != 0)
HouseHasCars = true;
}