14.06.2015, 16:32
For the first problem: you have to append the string each iteration or else you will get only the last player it looped through on the list.
Also DO NOT use IsPlayerConnected inside a foreach loop (unless you are not using the real "foreach" by ******, and you should!)
Example for only one leader:
Notice how I put "%s" in front of the string.
I have no idea what is wrong with the second one, try using the Streamer plugin.
Edit: seems like Konstantinos and I were writing at the same time, but he was faster, sorry!
Also DO NOT use IsPlayerConnected inside a foreach loop (unless you are not using the real "foreach" by ******, and you should!)
Example for only one leader:
Код:
CMD:lideri(playerid, params[]) { new string[564]; foreach(Player, i) { if (PI[i][Lider] == 1) format(string, sizeof(string), "%s{FBDF89} (( {00C0FF}Policija: {FFFFFF}%s / {FBDF89}ID:{FFFFFF}%d / {FBDF89}Telefon: {FFFFFF}%d. {FBDF89}))", string, ImeIgraca(i), i, PI[i][Telefon]); // more code } return 1; }
I have no idea what is wrong with the second one, try using the Streamer plugin.
Edit: seems like Konstantinos and I were writing at the same time, but he was faster, sorry!