Object Problem (Incognito's Streamer)
#1

Hello, I have a problem with my objects on my server, I can't remember when this started occurring.

Basically, after playing a few minutes on the server, a lot of objects stop loading at all. In some cases, an object loads and dissapears after a few seconds.

Things I tried to do:
  1. Increase and decrease the draw distance of all objects (from 150 to 300).
  2. Changing the tickrate.
  3. Chaning my frame limiter settings, this made it happen less times, but it doesn't fix it.
  4. Change the streamer_visible items.
  5. Downgrage the streamer plugin.
  6. Using a windows server instead of a linux server.
  7. Disabling timers to earn resources - The resouces aren't the problem.
  8. Loading less objects - can't tell if it helps or not, doesn't seem to.
Extra information:
  1. It only happens since a few months, never had the problem earlier.
  2. It happens for many players, not just me.
  3. It doesn't happen on other servers I tried.
  4. I have objects loading in world 0 only. (This doesn't matter?)
  5. I have 5125 objects loading from 23 files.
  6. I have another 14 objects in the actual gamemode.
  7. This only seems to happen after playing a few minutes.
  8. I don't know if an action causes this, or if it happens randomly.
Code:
pawn Код:
function LoadObjects()
{
    total_objects_from_files += LoadDynamicObjectsFromFile("Objects/StuntMaps/LSAP.txt"); // etc...
}

public OnGameModeInit()
{
//==============================================================================
    AntiDeAMX();
    SetGameModeText("DM/Stunt/Freeroam/Race/Mission");
    Streamer_TickRate(40);
    DisableInteriorEnterExits();
    EnableStuntBonusForAll(0);
    AllowAdminTeleport(1);
    Streamer_VisibleItems(STREAMER_TYPE_OBJECT, 150);
    CanRobHouse = 1;
    if(IsCorrectServer())
    {
        SetTimerEx("IRC_ConnectDelay", 5000, 0, "d", 1);
        SetTimerEx("IRC_ConnectDelay", 7000, 0, "d", 2);
        SetTimerEx("IRC_ConnectDelay", 9000, 0, "d", 3);
        SetTimerEx("IRC_ConnectDelay", 11000, 0, "d", 4);
        SetTimerEx("IRC_ConnectDelay", 13000, 0, "d", 5);
        gGroupID = IRC_CreateGroup();
    }
    SetTimerEx("ConnectNPCs", 5000, 0, "d", 1);
    SetTimerEx("ConnectNPCs", 7000, 0, "d", 2);
    SetTimerEx("ConnectNPCs", 9000, 0, "d", 3);
//==============================================================================
    LoadHouses(); LoadBusinesses(); LoadStores(); LoadVehicles(); LoadObjects(); // etc
}

// Example teleport:

dcmd_wff(playerid, params[])
{
    #pragma unused params
    if(PlayerInfo[playerid][Caged] == 1) return SendErrorMessage(playerid, 24);
    if(GetPVarInt(playerid, "Spawned") == 0) return SendErrorMessage(playerid, 6);
    if(GetPVarInt(playerid, "IsPlayerInDM") == 1) return SendErrorMessage(playerid, 10);
    if(GetPVarInt(playerid, "SearchingMysteryBag") == 1) return SendErrorMessage(playerid, 11);
    if(GetPVarInt(playerid, "IsPlayerInRace") == 1) return SendErrorMessage(playerid, 24);
    if(GetPVarInt(playerid, "IsInHouse") == 1) return SendErrorMessage(playerid, 25);
    if(GetPVarInt(playerid, "IsInStore") == 1) return SendErrorMessage(playerid, 26);
    if(GetPVarInt(playerid, "IsPlayerInMission") == 1) return SendErrorMessage(playerid, 27);
    if(GetPVarInt(playerid, "IsInBusiness") == 1) return SendErrorMessage(playerid, 29);
    if(IsInEvent[playerid] == 1) return SendErrorMessage(playerid, 28);
    else
    {
        TogglePlayerControllable(playerid, false);
        TelePlayer(playerid, -230.8559,439.2113,2.6685, 0, 0);
        LoadDynamicObjectsForPlayer(playerid);
    }
    return 1;
}

stock TelePlayer(playerid, Float:posX, Float:posY, Float:posZ, interior, world)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        new car = GetPlayerVehicleID(playerid);
        for(new t = 0; t < 25; t++) // IDK what this loop is good for, but it has been made by the previous owner.
        {
            Streamer_UpdateEx(playerid, posX, posY, posZ);
            SetVehiclePos(car, posX, posY, posZ);
        }
        Streamer_UpdateEx(playerid, posX, posY, posZ);
        SetVehiclePos(car, posX, posY, posZ);
        SetPlayerInterior(playerid,interior);
        PutPlayerInVehicle(playerid, car, 0);
        LinkVehicleToInterior(car, interior);
        SetVehicleVirtualWorld(car, world);
        SetCameraBehindPlayer(playerid);
    }
    else
    {
        for(new t = 0; t <= 25; t++) // Say same here
        {
            Streamer_UpdateEx(playerid, posX, posY, posZ);
            SetPlayerPos(playerid, posX, posY, posZ);
        }
        Streamer_UpdateEx(playerid, posX, posY, posZ);
        SetPlayerPos(playerid, posX, posY, posZ);
        SetPlayerInterior(playerid,interior);
        SetPlayerVirtualWorld(playerid,world);
        SetCameraBehindPlayer(playerid);
    }
    return 1;
}

// Example object line in txt file:
750, -3570.286376, 703.412292, 12.680887, 0.000000, 0.000000, 0.000000, 0, -1, -1, 150 ;
I hope anyone knows what can cause this and how to fix it, since I'm out of ideas...


Thanks in advance, Yoshi
Reply
#2

Its bcoz im not the admin. Server wants me!

~Vista1337
Reply
#3

Quote:
Originally Posted by TheVista1995
Посмотреть сообщение
Its bcoz im not the admin. Server wants me!

~Vista1337
thanks for your useful help -,-

Bumb
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)