LuxAdmin - Lagg 3 seconds when someone enter on my server
#1

Hello guys !

I use LuxAdmin and I have a problem : when someone enter on my server, is lagg for 3-4 seconds.

Who is the problem ? You can help me ?

Thanks!
Reply
#2

Check OnPlayerConnect, if there is something that makes the server lag, remove it or make a timer or find a way to fix it. For example, if you had OnPlayerConnect --> Something like, " SaveStats(playerid); " remove it and put it OnPlayerDisconnect ...
Reply
#3

I don't found anything that makes lagg at OnPlayerConnect.

Look, this is all function OnPlayerConnect :


Reply
#4

Okay, Copy all the AccInfo, all of them then put them where the player register.

You're actually making every status of player go to 0 or 1 every time a player connects, so putting it @ the registration lines will help evading lags and set the values for one time.
Reply
#5

Quote:
Originally Posted by Guitar
Посмотреть сообщение
Okay, Copy all the AccInfo, all of them then put them where the player register.

You're actually making every status of player go to 0 or 1 every time a player connects, so putting it @ the registration lines will help evading lags and set the values for one time.
Setting a variable is very fast, it don't make lag.

TempBanCheck and BuridgeConnect should make lag, post the functions there.

Try to look at OnPlayerConnect from GM/other FSs and post them here.
Reply
#6

Код:
public BuridgeConnect(playerid)
{
    GetPlayerName(playerid, pname12, sizeof(pname12));
    format(BurridgeScore, sizeof(BurridgeScore), "/Saver/%s.ini",pname12);
    if(!dini_Exists(BurridgeScore)) {
        dini_Create(BurridgeScore);
        dini_IntSet(BurridgeScore, "Score", 0);
        dini_IntSet(BurridgeScore, "Money", 0);
        SetPlayerScore(playerid, dini_Int(BurridgeScore, "Score"));
        SetPlayerMoney(playerid, dini_Int(BurridgeScore, "Money"));
    }
    else {
        SetPlayerScore(playerid, dini_Int(BurridgeScore, "Score"));
        SetPlayerMoney(playerid, dini_Int(BurridgeScore, "Money"));
    }
    return 1;
}
TempBanCheck is just at OnPlayerConnect :
Код:
	TempBanCheck(playerid);
Reply
#7

Quote:
Originally Posted by thebwgg
Посмотреть сообщение
Код:
public BuridgeConnect(playerid)
{
    GetPlayerName(playerid, pname12, sizeof(pname12));
    format(BurridgeScore, sizeof(BurridgeScore), "/Saver/%s.ini",pname12);
    if(!dini_Exists(BurridgeScore)) {
        dini_Create(BurridgeScore);
        dini_IntSet(BurridgeScore, "Score", 0);
        dini_IntSet(BurridgeScore, "Money", 0);
        SetPlayerScore(playerid, dini_Int(BurridgeScore, "Score"));
        SetPlayerMoney(playerid, dini_Int(BurridgeScore, "Money"));
    }
    else {
        SetPlayerScore(playerid, dini_Int(BurridgeScore, "Score"));
        SetPlayerMoney(playerid, dini_Int(BurridgeScore, "Money"));
    }
    return 1;
}
TempBanCheck is just at OnPlayerConnect :
Код:
	TempBanCheck(playerid);
BuridgeConnect could make lag... but not 3seconds lag. Look at OnPlayerConnect from GM/other Filterscripts.
TempBanCheck is in lfuncs, it's from LuxAdmin, and it don't make lag.
Reply
#8

OK, look, this is OnPlayerConnect from GM :
Код:
public OnPlayerConnect(playerid)
{
        brb[playerid] = 0;
	Glow[playerid] = 0;
	DM[playerid] = 0;
	BigEar[playerid] = 0;
	TextDrawShowForPlayer(playerid, welcome);
	TextDrawShowForPlayer(playerid, tinfo);
	gNameTags[playerid] = 1;
	for(new i; i < MAX_PLAYERS; i++)
    if(IsPlayerConnected(i) && gNameTags[i] == 0)
	ShowPlayerNameTagForPlayer(i, playerid, 0);
 	SetPVarInt(playerid, "laser", 0);
  	SetPVarInt(playerid, "color", 18643);
	SendClientMessage(playerid, 0x0000FFAA,"{FFFFFF}Welcome to {4764EF}Romania {FFFF00}Super {FF0000}Gaming {FFFFFF}!");
	SendClientMessage(playerid, 0xFFFFFFFF,"{FFFFFF}Comenzi Importante - {00FFEE}/cmds, {6EF83C}/updates, {FFFFFF}/credits, {F81414}/reguli");
	SendClientMessage(playerid, 0xFFFFFFFF,"{FFFFFF}Importants Commands - {00FFEE}/cmds, {6EF83C}/updates, {FFFFFF}/credits, {F81414}/rules");
	SendClientMessage(playerid, 0x33AA33AA,"{FF0000}R{FFFF00}S{4764EF}G{00C0FF} * The Best of the Best *");
	SetPlayerMapIcon( playerid, 0, -689.13,928.52,13.63, 35, 0 );
	SetPlayerMapIcon( playerid, 1, 2026.47,1008.11,10.82, 44, 0 );
	SetPlayerMapIcon( playerid, 2, 2000.90,1543.44,13.59, 9, 0 );
	SetPlayerMapIcon( playerid, 3, -1616.03,686.43,7.19, 30, 0 );
	SetPlayerMapIcon( playerid, 4, 2294.11,2468.65,10.82, 30, 0 );
	SetPlayerMapIcon( playerid, 5, 1544.0830,-1675.6649,13.5577, 30, 0 );
	SetPlayerMapIcon( playerid, 6, 397.6663,2460.0630,16.5000, 5, 0 );
	SetPlayerMapIcon( playerid, 8, -1955.749389,266.408355,35.174148, 52, 0 );
	SetPlayerMapIcon( playerid, 9, 1496.852539, 698.787109, 1018.056213, 19,  0 );
	SetPlayerMapIcon( playerid, 10, 2494.714111, -1666.929809, 13.343750, 62, 0 );
	SetPlayerMapIcon( playerid, 12, -2868.3000,-922.5251,9.4922, 53, 0 );
	SetPlayerMapIcon( playerid, 13, 309.5593,-369.9211,9.5036, 53, 0 );
	SetPlayerMapIcon( playerid, 14, 1360.0364,-1715.5333,8.4992, 19, 0 );
	SetPlayerMapIcon( playerid, 15, -1977.0634,104.9033,27.6875, 55, 0 );
	ClearVars(playerid);
	SyncCheckpoints(playerid);
	return 1;
}
Reply
#9

OnPlayerConnect looks allright.

Update all your plugins and includes. Should work.
Reply
#10

Quote:
Originally Posted by costel_nistor96
Посмотреть сообщение
OnPlayerConnect looks allright.

Update all your plugins and includes. Should work.
I updated all plugins, but the problem isn't solved.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)