29.12.2011, 21:17
I was deciding to make a dynamic Rules and everything goes fine but there is 1 problem.I did /createrule 1 Hey (/createrule [Ruleid] [rule]) then i did /createrule 2 Hello after i checked rules and it showed this.
-------------------------Rules-------------------------
Failing to follow these rules will result you in a admin punishment.
2. Hello
1. Hey
I want the ID to go in order as in
1.Hey
2.Hello
-------------------------Rules-------------------------
Failing to follow these rules will result you in a admin punishment.
2. Hello
1. Hey
I want the ID to go in order as in
1.Hey
2.Hello
pawn Код:
CMD:rules(playerid,params[])
{
new rID,rRule[128];
format(query,sizeof(query),"SELECT * FROM Rules");
mysql_query(query);
mysql_store_result();
SendClientMessage(playerid,COLOR_AQUA,"-------------------------Rules-------------------------");
SendClientMessage(playerid,red,"Failing to follow these rules will result you in a admin punishment.");
while(mysql_retrieve_row())
{
mysql_fetch_field_row(str,"ID"); rID = strval(str);
mysql_fetch_field_row(rRule,"Message");
format(str,sizeof(str),"%d. %s",rID,rRule);
SendClientMessage(playerid,Niceyellow,str);
}
mysql_free_result();
return 1;
}