02.04.2011, 18:11
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:
I hope anyone knows what can cause this and how to fix it, since I'm out of ideas...
Thanks in advance, Yoshi
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:
- Increase and decrease the draw distance of all objects (from 150 to 300).
- Changing the tickrate.
- Chaning my frame limiter settings, this made it happen less times, but it doesn't fix it.
- Change the streamer_visible items.
- Downgrage the streamer plugin.
- Using a windows server instead of a linux server.
- Disabling timers to earn resources - The resouces aren't the problem.
- Loading less objects - can't tell if it helps or not, doesn't seem to.
- It only happens since a few months, never had the problem earlier.
- It happens for many players, not just me.
- It doesn't happen on other servers I tried.
- I have objects loading in world 0 only. (This doesn't matter?)
- I have 5125 objects loading from 23 files.
- I have another 14 objects in the actual gamemode.
- This only seems to happen after playing a few minutes.
- I don't know if an action causes this, or if it happens randomly.
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 ;
Thanks in advance, Yoshi