MySql Login resetart my stats [help]
#1

pawn Код:
//// mysql login
stock MySql_Login(playerid)
{
    new pname[24], savingstring[512];
    new MySql_QueryLogin[500];
    GetPlayerName(playerid, pname, 24);
    format(MySql_QueryLogin, sizeof(MySql_QueryLogin), "SELECT * FROM `playerdata` WHERE `name` = '%s'", PlayerName(playerid));
    mysql_query(MySql_QueryLogin);
    mysql_store_result();
   
   

    if(mysql_fetch_row_format(savingstring))
    {


    sscanf(savingstring,"p<|>iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii",
    SafeGivePlayerMoney(playerid,GetPlayerMoney(playerid)),
    SetPlayerScore(playerid,GetPlayerScore(playerid)),
    robberrank[playerid],
    Jailed[playerid],
    JailTime[playerid],
    raperrank[playerid],
    arrestranks[playerid],
    swatranks[playerid],
    copranks[playerid],
    pvtlaw[playerid],
   
    armyranks[playerid],
    tazerank[playerid],
    hitmanranks[playerid],
    takesdownranks[playerid],
    weapondealer[playerid],
    itemsdealer[playerid],
    medic[playerid],
    mechanic[playerid],
    CanUseArmy[playerid],
    CanUseSwat[playerid],
   
    SwatCommander[playerid],
    ArmyCommander[playerid],
    PlayerAdminLevel[playerid],
    AccountLocked[playerid],
    HasWallet[playerid],
    HasCrock[playerid],
    HasDrugBag[playerid],
    PlayerDrugs[playerid],
    BankCash[playerid],
    AirPortOwner[playerid],
   
    BoatOwner[playerid],
    SFBoatOwner[playerid],
    DrugHouseOwner[playerid],
    grottiowner[playerid],
    autobahnowner[playerid],
    uttoautoowner[playerid],
    couttowner[playerid],
    wangsowner[playerid],
    BankRobInsurance[playerid],
    Warnings[playerid],
   
    IRCWarnings[playerid],
    RegAsAdmin[playerid],
    KickWarn[playerid],
    HaveBlunts[playerid],
    PlayerInjections[playerid],
    HaveWine[playerid],
    LockingPick[playerid]);


    SystemMsg(playerid,"You are now logged in. Your stats will be auto-saved when you disconnect");
    PLAYERLIST_authed[playerid]=true;
   
    }
    mysql_free_result();
    return 1;
}
Reply
#2

No need fix it ;P
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)