Player Problem (MYSQL)
#1

Hi guys.

I have server which has 30+ players but i've shutted down to make it MySQL... Now im trying to start it 2-3 times but everytime i fail. The problem is that when 30+ player join on the server, MySQL server for them doesn't work...

Example: I'm ID 1 and i've logged succsessfully and my stats will save.

Example: ID 30 doesn't have account and sometimes he doesnt get dialog to register (because MySQL doesn't check his account) or when he passes the register dialog, MySQL doesn't create table... I dont have mysql_log so there are no errors... MySQL works perfectly for 25 players, but from 25+ it messes up !

HELP (i use the newest mysql plugin r33)
Reply
#2

Make sure you're using R33 effectively, and let's have a look at some code to see how your players are logging in / registering etc..
Reply
#3

Okey

Checking players on OnPlayerConnect (After +30 players OnPlayerConnect doesn't even call):
pawn Code:
new szDestination[100];
format(szDestination,sizeof(szDestination), "SELECT * FROM `Igraci` WHERE pProfil = '%s'",plname);
mysql_function_query(1,szDestination,true,"CheckAccountExists","i",playerid);
pawn Code:
forward CheckAccountExists(playerid);
public CheckAccountExists(playerid)
{
    if(!IsPlayerConnected(playerid)) return 1; // Ako igracot slucajno se isklucil za da ne ja poebe databazata

    new rows, fields;
    cache_get_data(rows, fields);
    if(!rows)
    {
        gPlayerAccount[playerid] = 1;
    }
    else
    {
        gPlayerAccount[playerid] = 2;
        new playername2[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playername2, sizeof(playername2));
        new query[264];
        format(query,sizeof(query), "SELECT * FROM `Igraci` WHERE pProfil = '%s'", playername2);
        mysql_function_query(1,query,true,"VcituvanjePodatoci","ds",playerid, playername2);
    }
    return 1;
}
pawn Code:
forward VcituvanjePodatoci(playerid, ime[]);
public VcituvanjePodatoci(playerid, ime[])
{
    if(!IsPlayerConnected(playerid)) return 1; // Ako igracot slucajno se isklucil za da ne ja poebe databazata

    new rows, fields;
    cache_get_data(rows, fields);
   
    new podatok[64];
    cache_get_row(0, 0, podatok);
    PlayerInfo[playerid][pIgracID] = strval(podatok);
    //etc
    return 1;
}
Reply
#4

Bump...

After 30 player OnPlayerConnect isn't called... HELP !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)