04.10.2016, 22:39
I developed a code which the variable "items" has a capacity to store 145 items, which I made the following code to quickly save the items (which by the way, I do not know if this is the fastest way to list all items , I saw something out there regarding the use of sscanf but not quite understand .. so I opted for this method)
The question is simple, how would it be to load all items ?, and I'm using the symbol "|" to separate values and power load, the detail is that I can not assign each value to "pInfo[playerid][jItem][...]", without more, a greeting.
Код:
for(new items = 0; items < MAX_ITEMS; items++)
{
format(string, sizeof(string), "%i|',",
pInfo[playerid][jItem][items]);
}
mysql_format(mysql, query, sizeof(query), "\
UPDATE `users` SET `Items`='%s' WHERE `Nombre` = '%s'",
string,
GetName(playerid));
mysql_tquery(mysql, query, "", "");


