Code works ?
#1

hey

Код:
CMD:top10(playerid,params[])
{
 new msg[550], patirt[10], pinig[10], Zaidejas[MAX_PLAYER_NAME], query[500];
 new vieta = 0;
 format(query,sizeof(query),"SELECT * FROM `players` ORDER BY `Patirtis` LIMIT 10");
 format(query,sizeof(query),"SELECT * FROM `players` ORDER BY `Pinigai` LIMIT 10");
 mysql_query(query);
 mysql_store_result();
 while(mysql_fetch_row(query))
 {
  vieta ++;
  mysql_get_field("Vardas", Zaidejas);
  mysql_get_field("Patirtis", patirt);
  mysql_get_field("Pinigai", pinig);
  format(msg,sizeof(msg),"%s{FFFFFF}%d %s patirtis: {FF94B8}%d\r\n", msg, vieta, Zaidejas, patirt);
  format(msg,sizeof(msg),"%s{FFFFFF}%d %s pinigai: {FF94B8}%d\r\n", msg, vieta, Zaidejas, pinig);
 }
 ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Top 10",msg, "", "Uћdaryti");
 mysql_free_result();
 return 1;
}
or this code is good ? And he works ?
Reply
#2

Have you even tested it yourself?
Reply
#3

Quote:
Originally Posted by Pinguinn
Посмотреть сообщение
Have you even tested it yourself?
yeah same like Pinquinn
Reply
#4

You're formatting 'query' twice, so only the second format will be actually sent as a query.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)