SA-MP Forums Archive
Objects/Vehicles not loading - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Objects/Vehicles not loading (/showthread.php?tid=455545)



Objects/Vehicles not loading - seanny - 02.08.2013

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:

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>
Edit: After some debugging. OnGameModeInit seems to stop at LoadHouses();

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);
}



Re: Objects/Vehicles not loading - dEcooR - 02.08.2013

And do you used everywhere createdynamicobject?


Re: Objects/Vehicles not loading - seanny - 02.08.2013

Quote:
Originally Posted by dEcooR
Посмотреть сообщение
And do you used everywhere createdynamicobject?
Most objects are used with CreateDynamicObject().