02.03.2015, 18:40
Hey,
I have this code:
The problem is that there is only one fraktion in the string. That means, the string is "LSPD | Playername".
But I have 3 fraks in my DB, so why is there just one in the string?
"Rows" has the value 3 - that is right.
I have this code:
Код:
ocmd:leader(playerid) { if(player[playerid][pAdmin] <= 3)return SendErrorMessage(playerid); new string[500], i = 0; new rows = mysql_tquery(1,"SELECT * FROM `fraktionen`","OnFraksCount"); for(;i < rows; i++) { format(string,sizeof(string)," %s%s | "#HEXBlue"%s\n",string, fraktion[i][f_name], fraktion[i][f_leader]); } printf("%s",string); ShowPlayerDialog(playerid,DIALOG_ADM_FRAK, DIALOG_STYLE_LIST," Fraktionen", string,"Weiter", "Abbrechen"); return 1; }
But I have 3 fraks in my DB, so why is there just one in the string?
"Rows" has the value 3 - that is right.