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.
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...
Its bcoz im not the admin. Server wants me!