17.12.2009, 03:33
I want to echo all the bots online using ShowPlayerDialog but I can't make it work, here's what I got. It will only display one of the bots D:
Any help will be very helpful, thanks in advance.
Код:
if(strcmp(cmd, "/bots", true) == 0) {
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) {
if(IsPlayerNPC(i)) {
new botname[MAX_PLAYER_NAME];
GetPlayerName(i, botname, sizeof(botname));
format(string, sizeof(string), "%s(%d)\n", botname,i);
ShowPlayerDialog(playerid,BOTSLISTID,DIALOG_STYLE_MSGBOX,"Bots online",string,"OK","Cancel");
}
}
}
return 1;
}

