Show Dialog for all
#6

Quote:
Originally Posted by Infinity90
Посмотреть сообщение
pawn Код:
CMD:annrestart(playerid, params[])
    {
        if(PlayerInfo[playerid][pAdminLevel] >= 3)
        {
              for(new i=0; i < MAX_PLAYERS; i++)
              {
               new string[128];
               strcat(string, "There is going to be a restart\nPlease /q to save your stats before the restart");
               ShowPlayerDialog(i ,100, DIALOG_STYLE_MSGBOX, "Server Restarting Soon", string, "Close", "");
               }
               return 1;
        }
        return 1;
    }
Wouldn't that work ?
you have forgotten the if statement
pawn Код:
if(IsPlayerConnected(i)){
to optimize the for loop because you don't want to create this Dialog for Player who 're not online
Reply


Messages In This Thread
Show Dialog for all - by StuartD - 01.01.2013, 20:15
Re: Show Dialog for all - by Infinity90 - 01.01.2013, 20:21
Re: Show Dialog for all - by StuartD - 01.01.2013, 20:34
Re: Show Dialog for all - by Infinity90 - 01.01.2013, 20:42
Re: Show Dialog for all - by StuartD - 01.01.2013, 21:01
AW: Re: Show Dialog for all - by IPrototypeI - 01.01.2013, 22:47

Forum Jump:


Users browsing this thread: 1 Guest(s)