PPC housing problem
#1

Hi guys,

i use this house system in my server and i have problem with both lagging and spawn.. I will explain this for you.. When i use this fs like filterscript then it lagging so much in my server like players can't move.. When i try to add everything in my gamemode it lagging again but this code is the reasong for lag..

Quote:

public OnPlayerConnect(playerid)
{
// Setup local variables
new HouseID, HouseSlot, Name[24];

// Get the player's name
GetPlayerName(playerid, Name, sizeof(Name));

// Loop through all houses to find the ones which belong to this player
for (HouseID = 1; HouseID < MAX_HOUSES; HouseID++)
{
// Check if the house exists
if (IsValidDynamicPickup(AHouseData[HouseID][PickupID]))
{
// Check if the house is owned
if (AHouseData[HouseID][Owned] == true)
{
// Check if the player is the owner of the house
if (strcmp(AHouseData[HouseID][Owner], Name, false) == 0)
{
// Add the HouseID to the player's account for faster reference later on
APlayerData[playerid][Houses][HouseSlot] = HouseID;

// Load housecars if they weren't loaded at FilterscriptInit
if (LoadCarsDuringFSInit == false)
HouseFile_LoadCars(HouseID);

// Select the next HouseSlot
HouseSlot++;
}
}
}
}

return 1;
}

I tried to add this under requestspawn and then it's not lagging anymore but now players have problem with spawning.. they stay in requestclass witch means that they don't spawn to game after requestclass.. So let me know guys is it possible to fix it in someway?

whole of house code can you find here.. http://pastebin.com/PcGFbMeG Thanks in advance
Reply
#2

Have you tried using other house system? This is a great solution to check if its gamemode issue or filterscript issue.
I tested PPC House System on my servers no lag at all.
Reply
#3

Yes i tried other house systems works very well.. but the problem is that my server get 80-100 players every day and i use linux vps.. so do you thing it's the reason for lag? Because windows is much better than linux when we talking about lag..
Reply
#4

Because lag problem is gone when i put that under requestspawn makes me think that the reason is that code under onplayerconnect.. but now the problem is they (not all of players) staying in requestclass and don't spawn at all..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)