26.11.2013, 17:05
Is it possible to save weapons in a text variable rather than making a bunch of slots and then putting them INT variable in a mysql database?
new
pWeapon[13],
pAmmo[13]
;
for(new slot = 0; slot != sizeof(pWeapon); slot++)
GetPlayerWeaponData(playerid,slot,pWeapon[slot],pAmmo[slot]);
new str[128];
for(new slot = 0; slot != sizeof(pWeapon); slot++)
format(str,sizeof(str),"%s%d|",str,pWeapon[slot]);
str[strlen(str) - 1] = 0;
"UPDATE accounts SET Weapons = '%s' WHERE sql_id = %d",str,pData[playerid][userID]