[MySQL]Wont save
#1

Hey, well im trying to save the weapons on player disconnect in the smarter manner, but it wont work. Heres the script:
pawn Код:
new
                weaponid,
                MySQLQuery[300],
                ammo;

            for(new i; i < 13; i++) // looping through all weapon slots (0 - 12)
            {
                GetPlayerWeaponData(playerid, i, weaponid, ammo); // get weaponid and ammo

                if(!weaponid) continue; // don't insert if there's no weapon in this slot

                format(MySQLQuery, sizeof(MySQLQuery), "INSERT INTO ginklai VALUES (%d, %d, %d) ON DUPLICATE KEY UPDATE ammo = %d;", GetPVarInt(playerid, "AccID"), weaponid, ammo, ammo);
                mysql_query(MySQLQuery);
}
I put it onplayerdisconnect, and database is all set up. What is the problem?
Reply


Messages In This Thread
[MySQL]Wont save - by Type-R - 08.08.2014, 02:07
Re: [MySQL]Wont save - by Type-R - 08.08.2014, 12:32
Re: [MySQL]Wont save - by Type-R - 09.08.2014, 03:16
Re: [MySQL]Wont save - by Type-R - 10.08.2014, 01:35
Re: [MySQL]Wont save - by Misiur - 10.08.2014, 08:51
Re: [MySQL]Wont save - by Type-R - 12.08.2014, 20:50
Re: [MySQL]Wont save - by Type-R - 13.08.2014, 11:53
Re: [MySQL]Wont save - by Misiur - 13.08.2014, 14:32
Re: [MySQL]Wont save - by Type-R - 13.08.2014, 21:40
Re: [MySQL]Wont save - by Type-R - 14.08.2014, 11:34

Forum Jump:


Users browsing this thread: 1 Guest(s)