02.08.2013, 09:33
(
Последний раз редактировалось seanny; 02.08.2013 в 11:30.
)
I'm making a script from scratch and I've got to around 10k lines, but now my objects and vehicles will not load at all, CreateDynamicObject or CreateObject, either one wont load.
I'm using the streamer plugin, updated to the latest version.
I'm using AddStaticVehicleEx for my vehicles.
And my includes are as follows:
Edit: After some debugging. OnGameModeInit seems to stop at LoadHouses();
I'm using the streamer plugin, updated to the latest version.
I'm using AddStaticVehicleEx for my vehicles.
And my includes are as follows:
pawn Код:
#include <a_samp>
#include <sscanf2>
#include <YSI\y_ini>
#include <zcmd>
#include <YSI/y_iterate>
#include <KickBan>
#include <cuffs>
#include <strlib>
#include <a_zones>
#include <streamer>
pawn Код:
LoadHouses()
{
if(!fexist("houses.cfg")) return 1;
new
szFileStr[512],
iIndex,
File: iFileHandle = fopen("houses.cfg", io_read);
while (iIndex < sizeof(HouseInfo) && fread(iFileHandle, szFileStr)) {//The script seems to stop loading OnGameModeInit after this part of LoadHouses().
sscanf(szFileStr, "p<|>dds[128]d[24]ffffffffffddddddd",
HouseInfo[iIndex][hOwned],
HouseInfo[iIndex][hLevel],
HouseInfo[iIndex][hDescription],
HouseInfo[iIndex][hOwner],
HouseInfo[iIndex][hExteriorX],
HouseInfo[iIndex][hExteriorY],
HouseInfo[iIndex][hExteriorZ],
HouseInfo[iIndex][hExteriorR],
HouseInfo[iIndex][hExteriorA],
HouseInfo[iIndex][hInteriorX],
HouseInfo[iIndex][hInteriorY],
HouseInfo[iIndex][hInteriorZ],
HouseInfo[iIndex][hInteriorR],
HouseInfo[iIndex][hInteriorA],
HouseInfo[iIndex][hLock],
HouseInfo[iIndex][hRentable],
HouseInfo[iIndex][hRentFee],
HouseInfo[iIndex][hValue],
HouseInfo[iIndex][hInterior],
HouseInfo[iIndex][hSafeCash],
HouseInfo[iIndex][hSafeUsed]);
++iIndex;
HouseInfo[iIndex][hPickupID] = CreateDynamicPickup(1273, 23, HouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]);
HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel("[{00AA00}House{FFFFFF}]", COLOR_WHITE, HouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 30.0);
}
return fclose(iFileHandle);
}