Need help with mysql based gamemode.
#3

Sure, here you go:

pawn Код:
LoadCharacters(playerid, bool:showdialog) {
    printf("[ACCOUNT.PWN] LoadCharacters called.");
    //#pragma unused showdialog
    query[128] = 0;//[128];
    printf("[ACCOUNT.PWN] LC: Stage 1.");
    new accountid = GetPVarInt(playerid,"AccountID");
    if(accountid == 0) {
        printf("[ACCOUNT.PWN] LC: Stage 2.");
        return 0;
    }
    printf("[ACCOUNT.PWN] LC: Stage 3.");
    format(query, sizeof(query),"SELECT `username`,`id` FROM `characters` WHERE `accountid` = %d",accountid);
    printf("[ACCOUNT.PWN] LC: Stage 4.");
    mysql_function_query(g_mysql_handle, query, true, "OnLoadCharacters", "d", playerid);
    printf("[ACCOUNT.PWN] LC: Stage 5.");
    printf("[ACCOUNT.PWN] LoadCharacters loaded.");
    return 1;
}
Reply


Messages In This Thread
MySQL doesn't load characters on login, server crashes - by sidney123 - 09.05.2013, 21:16
Re: Need help with mysql based gamemode. - by TheStreetsRP - 09.05.2013, 21:20
Re: Need help with mysql based gamemode. - by sidney123 - 09.05.2013, 21:23
Re: Need help with mysql based gamemode. - by sidney123 - 10.05.2013, 18:17

Forum Jump:


Users browsing this thread: 3 Guest(s)