SA-MP Forums Archive
sqlite gangs - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: sqlite gangs (/showthread.php?tid=414356)



sqlite gangs - raddetine - 09.02.2013

I have a problem to command gangs gangpoints number database does not match the number of gangpoints When I gangs command

Link database: http://www.solidfiles.com/d/c36a39fe42/
img on the server:

Код:
CMD:gangs(playerid, params[])
{
	new gpstring[345];
          new DBResult:query = db_query(GangDatabase, "SELECT `NameGang`,`GangPoints` FROM `Gangs` ORDER BY `GangPoints` DESC LIMIT 10"), string[64];
	for(new i=0; i < db_num_rows(query); i++)
	{
	        new gNume[MAX_GANG_NAME];
		db_get_field_assoc(query,"NameGang",gNume,MAX_GANG_NAME);
		db_get_field_assoc(query,"GangPoints",gpstring,sizeof(gpstring));
		format(string,sizeof(string), "%d. %s %d", i+1, gNume, gpstring);
		SCM(playerid, WHITE,string);
	        db_next_row(query);
	}
	db_free_result(query);
	return 1;
}