[GameMode] Clean, Simple MySQL GM..
#24

I have a question.

I have changed all in SavePInfo and MySQL database to save the score. here is the code

pawn Код:
stock SavePInfo(playerid)
{
    if(GetPVarInt(playerid, "LoggedIN") == 1)
    {
        new
            Query[600];

        format(Query, sizeof(Query), "UPDATE `playerinfo` SET `kills` = %d,`score` = %d, `deaths` = %d, `money` = %d, `Level` = %d, `Last Pos X` = %f, `Last Pos Y` = %f, `Last Pos Z` = %f, `Interior` = %d WHERE `user` = '%s'", // Also remember to update this...

        PVar[playerid][pKills],
        GetPlayerScore(playerid), // <---- This is my change. see score in SQL code too.
        PVar[playerid][pDeaths],
        GetPlayerMoney(playerid),
        PVar[playerid][pLevel],
        PVar[playerid][pLastX],
        PVar[playerid][pLastY],
        PVar[playerid][pLastZ],
        GetPlayerInterior(playerid),
        pName(playerid));

        mysql_query(Query);
        mysql_free_result();
        return 1;
    }
    else return 0;
}
But I don't know much of sscanf and I can't understand what to change in load pinfo.

pawn Код:
stock LoadPlayerInfo(iPlayer)
{
    new
        Query[700];

    if(mysql_fetch_row(Query))
    {
        sscanf(Query, "e<p<|>s[24]s[35]ddddfffd>", PVar[iPlayer]); // Remember to update this if you add more info...
        mysql_free_result();
    }
    return 1;
}
I would like to know how to change this.

Best Regards,

MarMigs
Reply


Messages In This Thread
Clean, Simple MySQL GM.. - by [L3th4l] - 09.01.2011, 04:55
Re: Clean, Simple MySQL GM.. - by TheYoungCapone - 09.01.2011, 04:57
Re: Clean, Simple MySQL GM.. - by playbox12 - 09.01.2011, 11:54
Re: Clean, Simple MySQL GM.. - by [L3th4l] - 09.01.2011, 19:26
Re: Clean, Simple MySQL GM.. - by mevi - 10.01.2011, 05:16
Re: Clean, Simple MySQL GM.. - by Georgelopez1 - 14.01.2011, 15:59
Re: Clean, Simple MySQL GM.. - by [L3th4l] - 14.01.2011, 20:10
Re: Clean, Simple MySQL GM.. - by Ed2ka49 - 15.01.2011, 12:21
Re: Clean, Simple MySQL GM.. - by [L3th4l] - 15.01.2011, 20:33
Re: Clean, Simple MySQL GM.. - by Aroldo - 23.01.2011, 10:09
Re: Clean, Simple MySQL GM.. - by CoaPsyFactor - 23.01.2011, 11:14
Re: Clean, Simple MySQL GM.. - by Rocketeer - 25.01.2011, 02:54
Re: Clean, Simple MySQL GM.. - by Rocketeer - 25.01.2011, 13:40
Re: Clean, Simple MySQL GM.. - by [L3th4l] - 25.01.2011, 21:35
Re: Clean, Simple MySQL GM.. - by Anthonyx3' - 25.01.2011, 21:38
Re: Clean, Simple MySQL GM.. - by Rocketeer - 25.01.2011, 21:48
Re: Clean, Simple MySQL GM.. - by XFlawless - 26.01.2011, 05:31
Re: Clean, Simple MySQL GM.. - by [L3th4l] - 26.01.2011, 21:42
Re: Clean, Simple MySQL GM.. - by Rocketeer - 31.01.2011, 02:11
Re: Clean, Simple MySQL GM.. - by [L3th4l] - 31.01.2011, 02:20
Re: Clean, Simple MySQL GM.. - by Rocketeer - 31.01.2011, 02:22
Re: Clean, Simple MySQL GM.. - by [L3th4l] - 31.01.2011, 02:25
Re: Clean, Simple MySQL GM.. - by Rocketeer - 31.01.2011, 02:27
Re: Clean, Simple MySQL GM.. - by marmigs - 31.01.2011, 10:32
Re: Clean, Simple MySQL GM.. - by HyperZ - 31.01.2011, 12:09
Re: Clean, Simple MySQL GM.. - by Rocketeer - 31.01.2011, 19:36
Re: Clean, Simple MySQL GM.. - by manchestera - 09.11.2011, 17:58
Re: Clean, Simple MySQL GM.. - by manchestera - 09.11.2011, 18:15
Re: Clean, Simple MySQL GM.. - by boudewijnpleij - 03.12.2011, 14:20
Re: Clean, Simple MySQL GM.. - by wolfcock - 20.12.2011, 12:08
Re: Clean, Simple MySQL GM.. - by XFlawless - 21.12.2011, 03:33
Re: Clean, Simple MySQL GM.. - by Astralis - 21.12.2011, 04:38
Re: Clean, Simple MySQL GM.. - by alex.naoumov - 25.01.2012, 13:21
Re: Clean, Simple MySQL GM.. - by SuperSir - 12.08.2012, 18:54
Re: Clean, Simple MySQL GM.. - by Jason112 - 20.08.2012, 15:09
Re: Clean, Simple MySQL GM.. - by Goldilox - 05.04.2013, 00:41

Forum Jump:


Users browsing this thread: 15 Guest(s)