Quote:
Originally Posted by ATGOggy
This will work:
PHP Code:
CMD:admins(playerid) {
new string[256], tempstring[56], plName[MAX_PLAYER_NAME];
foreach(Player, i) {
if(PlayerInfo[i][pAdmin] != 0) {
GetPlayerName(i, plName, sizeof plName);
format(tempstring, sizeof tempstring, "Admin: %s(%d), Rank:%d\n", plName, i, PlayerInfo[i][pAdmin]);
strcat(string, tempstring, sizeof(string));
}
ShowPlayerDialog(playerid, DIALOG_ID, DIALOG_STYLE_MSGBOX, "Admins Online", string, "Okay, "");
}
return 1;
}
|
You've just copied my code and added strcat. I've nothing wrong with that, but, I really don't see the point. Also, you haven't read ******' tutorial about using 256 sized strings, which is why I used a string size of 128 and added the MAX_PLAYER_NAME size which is 24.