Gamemode loading so slow.
#1

Hi, I'm trying to launch my server.

My gamemode has 101.000 lines.
I do not know what happens, but to run the server as it takes about 6 minutes to fully charge.

Any idea what might be going on?
Reply
#2

If your gamemode is using MySQL, it is highly recommended that you use a MySQL database hosted on the same computer as the server to improve performance greatly.
Reply
#3

No it doesn't use MYSQL.
I have a question.
Might it cause the problem?:
PHP код:
    printf("[script] 3DTEXTDRAW LIMIT: %d (Static, non-streamed) | 3DTEXTDRAW COUNT: %d"1024CountDynamic3DTextLabels() );
    
printf("[script] PICKUP LIMIT: %d (Static, non-streamed) | PICKUP COUNT: %d"MAX_PICKUPSCountDynamicPickups() );
    
printf("[script] OBJECT LIMIT: %d (Static, non-streamed) | OBJECT COUNT: %d"MAX_OBJECTSCountDynamicObjects() ); 
I have many pickups, objects and many textdraws on my server.
Reply
#4

That seems to be a lot of lines, I don't know why this is happening.

OT: are you Phoenix from DGZ?
Reply
#5

Someone who can tell me?
Reply
#6

tell us what happens when you start up the server, like things that get loaded etc. 6 minutes is a long time for a server to restart
Reply
#7

Hello.
What happens is:
When I open the console shows this:

Код:
SA-MP Dedicated Server
----------------------
v0.3e-R2, ©2005-2012 SA-MP Team

[16:27:48] 
[16:27:48] Server Plugins
[16:27:48] --------------
[16:27:48]  Loading plugin: xml.dll
[16:27:48]   Loaded.
[16:27:48]  Loading plugin: streamer.dll
[16:27:48] 

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[16:27:48]   Loaded.
[16:27:48]  Loading plugin: sscanf.dll
[16:27:48] 

[16:27:48]  ===============================

[16:27:48]       sscanf plugin loaded.     

[16:27:48]    © 2009 Alex "******" Cole

[16:27:48]    0.3d-R2 500 Players "dnee"

[16:27:48]  ===============================

[16:27:48]   Loaded.
[16:27:48]  Loading plugin: whirlpool.dll
[16:27:48]  
[16:27:48]  ==================
[16:27:48]  
[16:27:48]   Whirlpool loaded
[16:27:48]  
[16:27:48]  ==================
[16:27:48]  
[16:27:48]   Loaded.
[16:27:48]  Loading plugin: audio.dll
[16:27:48] 

*** Audio Plugin v0.4 by Incognito loaded ***


[16:27:48]   Loaded.
[16:27:48]  Loaded 5 plugins.

[16:27:48] 
[16:27:48] Filterscripts
[16:27:48] ---------------
[16:27:48]   Loading filterscript 'AmbuInt.amx'...
[16:27:48]   Ambulance Interior by Cybertron Loaded!
[16:27:48]   Loading filterscript 'attachments.amx'...
[16:27:48]   Loading filterscript 'buttons.amx'...
[16:27:48]   Loading filterscript 'animlist.amx'...
[16:27:48] 
--------------------------------------
[16:27:48]    -G.O-Anim Sytem     By: G4M3Ov3r         
[16:27:48] --------------------------------------

[16:27:48]   Loaded 4 filterscripts.

[16:27:49]  
[16:27:49]  ======================================= 
[16:27:49]  |                                     | 
[16:27:49]  |        YSI version 1.03.0011        | 
[16:27:49]  |        By Alex "******" Cole        | 
[16:27:49]  |                                     | 
[16:27:49]  |  Checking the latest YSI version..  | 
[16:27:49]  |                                     | 
[16:27:49]  ======================================= 
[16:27:49]  
[16:27:49] *** Audio Plugin: Started TCP server on port 7777
[16:27:49] Gamemode started.
[16:27:49] Gamemode started.
[16:27:49] Gamemode started.
[16:27:49] test.
After 15 minutes it changed to:

Код:
[16:42:13] testhere.
[16:42:13]  
[16:42:13] -------------------------------------------
[16:42:13] Loading...
[16:42:13] Welcome to MY Roleplay
[16:42:13] -------------------------------------------
[16:42:13]  
[16:42:13] Number of vehicle models: 84
[16:42:13]  
[16:42:13]  ========================================== 
[16:42:13]  |                                        | 
[16:42:13]  |  A new version (v<html><he) of YSI is  | 
[16:42:13]  |            available from:             | 
[16:42:13]  |                                        | 
[16:42:13]  |     www.y-less.com/YSI/YSI_1.0.zip     | 
[16:42:13]  |                                        | 
[16:42:13]  ========================================== 
[16:42:13]
Reply
#8

that's the output, however you haven't shown or told what you have in OnGameModeInit
Reply
#9

PHP код:
public OnGameModeInit()
{
    print(
"Gamemode started.");
    
// Default Rates
    
print("Gamemode started.");
    new 
a[][] =
    {
        
"Unarmed (Fist)",
        
"Brass K"
    
};
    
#pragma unused a
    
print("Gamemode started.");
    
tollstatus 0;
    
tollopen 0;
    
carrieronestatus 0;
    
carriertwostatus 0;
    
//InitDatabase();
    //Audio_SetPack("default_pack", true);
    
djson_GameModeInit();
    
EnableStuntBonusForAll(0);
    new 
servergmtextstr[128];
    
format(servergmtextstr128"gamemodetext %s"SERVER_GM_TEXT);
    
SendRconCommand(servergmtextstr); // DO NOT REMOVE THIS
    
new string[42];
    new 
string1[MAX_PLAYER_NAME];
    
ShowPlayerMarkers(PLAYER_MARKERS_MODE_STREAMED);
    
DisableInteriorEnterExits();
    
InitTurfWars();
    
LoadTurfWars();
    
InitPaintballArenas();
    
LoadPaintballArenas();
    
InitEventPoints();
    
LoadEventPoints();
    
LoadDynamicDoors();
    
LoadDynamicMapIcons();
    
LoadHouses();
    
LoadGates();
    
LoadBoxer();
    
LoadStuff();
    print(
"test111222.");
    
LoadElevatorStuff();
    
LoadServerStats();
    
LoadThePay();
    
LoadFamilies();
    
LoadPoints();
    
LoadcDealerships();
    print(
"22247.");
    for(new 
0sizeof(FamilyInfo); f++)
    {
        for(new 
fv 0fv MAX_GANG_VEHICLESfv++)
        {
            
FamilyVehicleInfo[f][fv][fvModelId] = 0;
            
FamilyVehicleInfo[f][fv][fvSpawnx] = 0.0;
            
FamilyVehicleInfo[f][fv][fvSpawny] = 0.0;
            
FamilyVehicleInfo[f][fv][fvSpawnz] = 0.0;
            
FamilyVehicleInfo[f][fv][fvSpawna] = 0.0;
            
FamilyVehicleInfo[f][fv][fvPaintJob] = -1;
            
FamilyVehicleInfo[f][fv][fvColor1] = 126;
            
FamilyVehicleInfo[f][fv][fvColor2] = 126;
            
FamilyVehicleInfo[f][fv][fvPrice] = 0;
            
FamilyVehicleInfo[f][fv][fvFuel] = 100.00;
            
FamilyVehicleInfo[f][fv][fvId] = INVALID_VEHICLE_ID;
        }
    }
    print(
"1222222222222222.");
    
LoadFamiliesHQ();
    
LoadMOTDs();
    
ClearReports();
    
SetNameTagDrawDistance(60.0);
    print(
"t4444est.");
    
GiftAllowed 1;
    
News[hTaken1] = 0News[hTaken2] = 0News[hTaken3] = 0News[hTaken4] = 0News[hTaken5] = 0;
    
format(stringsizeof(string), "Nothing");
    
strmid(News[hAdd1], string0strlen(string), 255);
    
strmid(News[hAdd2], string0strlen(string), 255);
    
strmid(News[hAdd3], string0strlen(string), 255);
    
strmid(News[hAdd4], string0strlen(string), 255);
    
strmid(News[hAdd5], string0strlen(string), 255);
    
format(string1sizeof(string1), "No-one");
    
strmid(News[hContact1], string10strlen(string1), 255);
    
strmid(News[hContact2], string10strlen(string1), 255);
    
strmid(News[hContact3], string10strlen(string1), 255);
    
strmid(News[hContact4], string10strlen(string1), 255);
    
strmid(News[hContact5], string10strlen(string1), 255);
    
PlayerHaul[43][pCapasity] = 100;
    
PlayerHaul[44][pCapasity] = 100;
    
PlayerHaul[45][pCapasity] = 50;
    
PlayerHaul[46][pCapasity] = 50;
    
format(objstoresizeof(objstore), "MOLE: I got nothing, check back with me later.");
    
format(cbjstoresizeof(cbjstore), "HQ: There is nothing in your Vicinity, Out.");
    
gettime(ghourgminutegsecond);
    
FixHour(ghour);
    print(
"testhere.");
    
ghour shifthour;
    if(!
realtime)
    {
//        SetWorldTime(wtime);
        
gTime wtime;
    }
    
AllowInteriorWeapons(1);
    
UsePlayerPedAnims();
    
// CreatedCars check
    
for(new 0sizeof(CreatedCars); i++)
    {
        
CreatedCars[i] = INVALID_VEHICLE_ID;
    }
    for(new 
0MAX_VEHICLESv++)
    {
        
VehicleFuel[v] = 100.0;
    }
    
// Player Class's
    
for(new 0<= sizeof(Peds)-1i++)
    {
        
AddPlayerClass(Peds[i][0],1958.3783,1343.1572,1100.3746,269.1425,-1,-1,-1,-1,-1,-1);
    }
//Some Objects 
Won't be the problem here::
PHP код:
[16:42:13]  ========================================== 
[
16:42:13]  |                                        | 
[
16:42:13]  |  new version (v<html><heof YSI is  
[
16:42:13]  |            available from:             | 
[
16:42:13]  |                                        | 
[
16:42:13]  |     www.y-less.com/YSI/YSI_1.0.zip     
[
16:42:13]  |                                        | 
[
16:42:13]  ========================================== 
Reply
#10

you've changed the prints from the output and possibly the position of them, from what I can see it might be FixHour that's the problem, you can run the profiler plugin to detect bottlenecks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)