Top Groups SQLITE
#2

yeah, i know i have make this script

Код:
CMD:topgroups(playerid,params[])
{
	new string[128], query[256];
	SendClientMessage(playerid,COLOR_WHITE,"Top Groups");
	new DBResult:result;
	new DBResult:result2;
	format(query,sizeof(query),"SELECT `GroupName` FROM `Groups` ORDER BY (`GroupKills` * 1) DESC limit 3");
	result = DB::Query(query);
	for(new a;a<db_num_rows(result);a++)//what we have now is 10 rows in the database result, so we'll do a loop to show each one on a new line.
	{
		db_get_field(result,0,string,128);
		format(string,sizeof(string),"%d. %s",a+1,string);//it's a+1 because the result starts at 0, this will display as "1. Name Stat: X".
  		SendClientMessage(playerid,COLOR_WHITE,string);
		db_next_row(result);//this function changes to the next row down, then when it goes into the next loop cycle it'll get the second top player and so forth.
		db_free_result(result2);//remember to free any results you don't need anymore
	}
	db_free_result(result);
	return 1;
}
but i want make it to dialog msgbox and the text will be :

1. GroupName With Kills GroupKills
2. GroupName With Kills GroupKills


can you help me ?
Reply


Messages In This Thread
Top Groups SQLITE - by SilverStand - 25.12.2015, 12:56
Re: Top Groups SQLITE - by SilverStand - 25.12.2015, 13:22
Re: Top Groups SQLITE - by SilverStand - 25.12.2015, 13:47
Re: Top Groups SQLITE - by iKarim - 25.12.2015, 13:58
Re: Top Groups SQLITE - by SilverStand - 25.12.2015, 14:05

Forum Jump:


Users browsing this thread: 1 Guest(s)