Server Freezes When A Lot Of Players Quitting And Joining My Server In One Time [+REP]
#1

Hello,So I Am Facing This Problem For 2 Months So Please Help Me:

Codes:
pawn Код:
#define DIALOG_RULES2 12
#define savefolder "/Accounts/%s.ini" // This defines the file name and folder
public OnPlayerConnect(playerid)
{
    new string[64], pName2[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName2,MAX_PLAYER_NAME);
    format(string,sizeof string,"%s (%d) Has Joined The Server.",pName2,playerid);
    GameTextForPlayer(playerid, "Welcome To The Los Santos Gang War Server", 5000, 4);
    ShowPlayerDialog(playerid, DIALOG_RULES2, DIALOG_STYLE_MSGBOX, "Server Rules", "1- No Cheating\n2- No Spamming\n3- Slide Bug Is Not Allowed But C Bug Is Allowed\n4- No Rule Breaking\n5- No G Abuse\n6- No Advertising\n7- Teleport Abuse Is Not Allowed\n8- Weapon Mods Are Allowed Only\n9- Respect Player Especially Admins\n10- Scamming Is Not Allowed\n11- Aimbot Is Not Allowed\n12- Don't Try To Climb Up Over The Freeroam Walls If You Are(not) In Freeroam Mod\n\nDo You Agree The Server Rules?", "Yes", "No");
    SendClientMessageToAll(0xAFAFAFAA,string);
    SendClientMessage(playerid,-1,"Welcome To The {FFEA00}LOS SANTOS GANG WARS{FFFFFF} Version 2.2! Please Enjoy Your Stay.");
    SendClientMessage(playerid,-1,"You Can Listen,Save,Stop,Check Your Favourite Song Or Unsave Your Song By Some Commands For It In /cmds");
    SendClientMessage(playerid, 0x00EEFFFF, "Please Visit Our Forums: lsgangwars.createaforum.com");
    SendClientMessage(playerid, 0x00FF22FF, "When You Spawn A Skin Type /help To See The Help Menu.");
    new pname[128];  // This get's the length of the player name
    new file[128];        // This get's the lenght of the file
    GetPlayerName(playerid, pname, sizeof(pname)); // This get's the player name with the lenght of the player name
    format(file, sizeof(file), savefolder,pname); // This describe's where to save and how to save it
    if(dini_Exists(file)) { // If the file exist
        SetPlayerScore(playerid, dini_Int(file, "Score"));
        SetPlayerMoney(playerid, dini_Int(file, "Money"));
        LPinfo[playerid][Drugs] = dini_Int(file,"Drugs");
        LPinfo[playerid][Adre] = dini_Int(file,"Adrenaline Pills");
        BankMoney[playerid] = dini_Int(file,"BankMoney");
        Favouritesong[playerid] = dini_Int(file,"SongID");
    }
    else {
        dini_Create(file); // Create the file
        dini_IntSet(file, "Score", 0); // Set's "Score"
        dini_IntSet(file, "Money", 0); // Set's "Money"
        dini_IntSet(file, "Drugs", 0); // Set's "Kills"
        dini_IntSet(file, "Adrenaline Pills", 0); // Set's "Kills"
        dini_IntSet(file, "BankMoney", 0); // Set's "Kills"
        dini_IntSet(file, "SongID", 0); // Set's "Kills"
        SetPlayerScore(playerid, dini_Int(file, "Score")); // This describes where to load the score
        SetPlayerMoney(playerid, dini_Int(file, "Money")); // This describes where to load the money
        // the same thing
    } // This get's the length of the player name
    pInfo[playerid][Last] = -1;
    pInfo[playerid][NoPM] = 0;
    PlayerCar[playerid] = -1;
    AntiKillRowSpam[playerid] = 0;
    PlayAudioStreamForPlayer(playerid, "http://s3.argim.net/files/r/gta_san_andreas_theme_song_wmm.mp3");
    return 1;
}
Please Help
Reply
#2

slow I/O?
Reply
#3

what you mean?
Reply
#4

Try converting your script to Y_INI instead of dini. It'll work faster, that's for sure.
Reply
#5

i dont know about Y_INI,can you convert it for me?
Reply
#6

I'm not going to convert it for you. Learn Y_INI or find somebody to do it for you.
Reply
#7

I Don't Think That Loading And Saving Will Affect On Server Freezing.
Reply
#8

Anyone?
Reply
#9

y_ini is the best try it thats the Fastest ini processer...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)