ShowDialogForAll(dialogid, dialogstyle, caption[], info[], button1[], button2[])
{
new
x
;
do
{
if(IsPlayerConnected(x) && !IsPlayerNPC(x))
{
ShowPlayerDialog(x, dialogid, dialogstyle, caption, info, button1, button2);
}
}
while((x != MAX_PLAYERS));
return 1;
}
CMD:annrestart(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] >= 3)
{
new string[128];
strcat(string, "There is going to be a restart\nPlease /q to save your stats before the restart");
ShowDialogForAll(100, DIALOG_STYLE_MSGBOX, "Server Restarting Soon", string, "Close", "");
return 1;
}
return 1;
}
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;
}
(1068) : error 035: argument type mismatch (argument 3)
1066: new string[128];
1067: strcat(string, "There is going to be a restart\nPlease /q to save your stats before the restart");
1068: ShowDialogForAll(i ,100, DIALOG_STYLE_MSGBOX, "Server Restarting Soon", string, "Close", "");
1069: return 1;
ShowDialogForAll
//Too
ShowPlayerDialog
CMD:annrestart(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] >= 3)
{
for(new i=0; i < MAX_PLAYERS; i++)
{
new string[128];
format(string, sizeof(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;
}
pawn Код:
|
if(IsPlayerConnected(i)){