16.02.2012, 20:19
Use strcat to build the string and then format it all
pawn Код:
strcat(query, "INSERT INTO players (`id` , ");
strcat(query, "`username` , `password` , `money` , `bank` , ");
...
strcat(query, "VALUES (%i, %s, %s, %i, %i, %i, %i, %i, %i, ");
strcat(query, "%i, %i, %i, %i, %i, %s, NOW(), ");
...
strcat(query, "%i, %i, %i, %i, %i, %i, %i)");
format(query, sizeof(query), query, id+1, PlayerName(playerid), pPassword[0][playerid], 15000, PlayerInfo[playerid][pBank],
PlayerInfo[playerid][pWeap1], PlayerInfo[playerid][pWeap2], ...);