17.07.2015, 22:12
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..
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
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; } |
whole of house code can you find here.. http://pastebin.com/PcGFbMeG Thanks in advance