Negative Values in MySQL?
#6

pawn Code:
stock LoadPlayer(playerid, inputtext[])
{
    new hash[129];
    WP_Hash(hash, sizeof(hash), inputtext);
    if(IsPlayerConnected(playerid))
    {
        if(!strcmp(hash, mysql_ReturnPasswort(GetName(playerid)), true))
        {
            Spieler[playerid][pCash] = mysql_GetInt("accounts", "Cash", "Name", GetName(playerid));
//etc.
pawn Code:
stock SavePlayer(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        new query[1024];
        format(query, sizeof(query), "UPDATE `accounts` SET Level=%d, Admin=%d, Cash=%d, Tutorial=%d, AccountLocked=%d, SpawnHealth=%f, Geschlecht=%d, Skin=%d, Perso=%d, CarLic=%d, Fraktion=%d, Rank=%d WHERE Name='%s'",
        Spieler[playerid][pLevel],
        Spieler[playerid][pAdmin],
        GetPlayerMoney(playerid),
        Spieler[playerid][pTutorial],
        Spieler[playerid][pAccountLocked],
        Spieler[playerid][pSpawnHealth],
        Spieler[playerid][pGeschlecht],
        Spieler[playerid][pSkin],
        Spieler[playerid][pPerso],
        Spieler[playerid][pCarLic],
        Spieler[playerid][pFraktion],
        Spieler[playerid][pRank],
        GetName(playerid));
        mysql_query(query);
:/
Reply


Messages In This Thread
Negative Values in MySQL? - by 'Pawno. - 25.12.2012, 09:58
Re: Negative Values in MySQL? - by Djole1337 - 25.12.2012, 10:05
Re: Negative Values in MySQL? - by Sinner - 25.12.2012, 10:28
AW: Negative Values in MySQL? - by 'Pawno. - 25.12.2012, 11:38
Re: Negative Values in MySQL? - by Typhome - 25.12.2012, 11:40
AW: Negative Values in MySQL? - by 'Pawno. - 25.12.2012, 11:45
AW: Negative Values in MySQL? - by 'Pawno. - 25.12.2012, 14:21

Forum Jump:


Users browsing this thread: 3 Guest(s)