14.04.2013, 16:43
stock functions do not return errors as long as they're not implemented in a callback.
pawn Код:
stock LoadHouses()
{
for(new i = 0; i < MAX_HOUSES; i++)
{
INI_Int("InteriorID", HouseVar[i][hInteriorID]);
INI_String("InteriorX", HouseVar[i][hInteriorX]);
INI_String("InteriorY", HouseVar[i][hInteriorY]);
INI_String("InteriorZ", HouseVar[i][hInteriorZ]);
INI_String("HousePrice", HouseVar[i][HousePrice]);
INI_Int("ExteriorID", HouseVar[i][hExteriorID]);
INI_Float("ExteriorX", HouseVar[i][hExteriorX]);
INI_Float("ExteriorY", HouseVar[i][hExteriorY]);
INI_Float("ExteriorZ", HouseVar[i][hExteriorZ]);
INI_Float("VaultMoney", HouseVar[i][VaultMoney]);
INI_Float("HouseCocaine", HouseVar[i][HouseCocaine]);
INI_Int("HousePot", HouseVar[i][HousePot]);
INI_Int("HouseMaterials", HouseVar[i][HouseMaterials]);
INI_Int("Owner", HouseVar[i][hOwner]);
INI_String("LockStatus", HouseVar[i][LockStatus]);
INI_Int("WeaponSlot1", HouseVar[i][WeaponSlot1]);
INI_Int("WeaponSlot2", HouseVar[i][WeaponSlot2]);
INI_Int("WeaponSlot3", HouseVar[i][WeaponSlot3]);
if(strcmp(HouseVar[i][hOwner], "Nobody", true) == 0)
{
HouseVars[i][LockStatus] = 0;
HouseVar[i][HPickupID] = CreateDynamicPickup(1273, 23, HouseVar[i][hExteriorX], HouseVar[i][hExteriorY], HouseVar[i][hExteriorZ], 0, -1, -1, 150.0);
}
else
{
HouseVar[i][HPickupID] = CreateDynamicPickup(1272, 23, HouseVar[i][hExteriorX], HouseVar[i][hExteriorY], HouseVar[i][hExteriorZ], 0, -1, -1, 150.0);
}
printf("[system] House %d spawned.", i);
}
SpawnedHouses++;
return 1;
}