Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
3.0 kB
2
Indexable
Never
stock CreateMySQLConnection(host[], user[], db[], pass[]) //BD
{
    connects = mysql_connect(host, user, db, pass);

    if(mysql_errno()==0) 
    {
        print("[SERVER] MYSQL Connected to the server!");
    }
    else 
    {
        printf("[SERVER] MYSQL ERROR CODE %d", mysql_errno());
    }
    report_OnGameModeInit();
    mysql_function_query(connects,"SET NAMES cp1251",false,"","");
    // mysql_function_query(connects,"set character_set_client='cp1251'",false,"","");
    //mysql_function_query(connects,"set character_set_results='cp1251'",false,"","");
    mysql_function_query(connects,"set collation_connection='cp1251_general_ci'",false,"","");
    mysql_function_query(connects, "UPDATE accounts SET pOnlineYes = day_online, day_online = '0',last_login = '0',pAfkYes = pDayAfk, pDayAfk = '0'", false, "", "");//last_login = '0'
    mysql_function_query(connects, "UPDATE bizz SET bProduct = '100000'", false, "", "");
    mysql_function_query(connects,"SELECT * FROM "TABLE_BIZZ"", true, "LoadBizz", "");
    mysql_function_query(connects,"SELECT * FROM "TABLE_HOUSE"",true,"LoadProperty","");
    mysql_tquery(connects,"SELECT * FROM gzlogo", "LoadGZLogo","");
    mysql_function_query(connects,"SELECT * FROM "TABLE_GANGZONE"", true, "OnLoadGzCallback", "");
    mysql_function_query(connects,"SELECT * FROM "TABLE_OTHER"", true, "OnLoadOtherCallback", "");
    mysql_function_query(connects,"SELECT * FROM "TABLE_MERIA"", true, "OnLoadMeriaCallback", "");
    mysql_function_query(connects,"SELECT * FROM "TABLE_PICK"", true, "LoadPick", "");
    mysql_function_query(connects,"SELECT * FROM "TABLE_GREENZONE"", true, "LoadZone", "");
    //mysql_function_query(connects,"SELECT * FROM family_system", true, "family_loading", "" ) ;
    mysql_tquery ( connects, "SELECT * FROM family_system ORDER BY family_system.fam_id ASC", "family_loading" ) ;
    mysql_function_query(connects,"SELECT * FROM family_cars", true, "family_car_load", "" ) ;
    mysql_function_query(connects,"SELECT * FROM board", true, "LoadBoard", "" ) ;
    mysql_function_query(connects, "SELECT * FROM dropped_items WHERE storage_type = '11'", true, "LoadPlantsCallBack", "");
    mysql_function_query(connects, "DELETE FROM dropped_items WHERE drop_time < UNIX_TIMESTAMP()-5760 AND storage_type != '11'", false, "", "");
    mysql_function_query(connects, "SELECT * FROM dropped_items WHERE storage_type != '11'", true, "LoadDItems", "");
    mysql_function_query(connects,"SELECT * FROM bank", true, "TotalBankCeck", "" ) ;
    mysql_tquery(connects,"SELECT * FROM fraction_ranks","OnFracRankLoad","");
    mysql_tquery(connects,"SELECT * FROM realtors", "LoadRealtors", "");
    mysql_function_query(connects, "SELECT * FROM config", true, "LoadConfig", "");
    mysql_function_query(connects, "SELECT * FROM hostnames", true, "LoadNames", "");

    mysql_function_query(connects, "SELECT * FROM server_settings", true, "LoadSettings", "");

    return 1;
}
Leave a Comment