Quote:
Originally Posted by Type-R
how do i do this with old MySQL like R4? I put this on disconnect:
pawn Code:
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 go to the server, give myself weapons then quit, and nothing appears in the database. and how could i redo, the loading for Queries? Thank you.
|
That's outdated, use R33+, (R39-2)