SA-MP Forums Archive
Admin Help in dialog {script help} - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Admin Help in dialog {script help} (/showthread.php?tid=375541)



Admin Help in dialog {script help} - zT KiNgKoNg - 07.09.2012

Hey guys iv made this script and i need somthing so i can send the request to the admins online
here is my code
pawn Код:
if(listitem == 0) // They selected the first item - Desert Eagle
            {
                GetPlayerName(message, name, sizeof(name));
                format(messagesend, sizeof(messagesend), "Admin Request Help\n Name:%s\nMessage:%s\n Use /aresponde [id] [responde message] to send your message",name,inputtext);
                message = strval(inputtext);
                ShowPlayerDialog(playerid, DIALOG_HELP_RAH,DIALOG_STYLE_INPUT,"{FD0006}Admin Help Request","Please Enter Your Message Below", "Send", "");
                if(PlayerInfo[playerid][pAdmin] >= 1)
                {
                ShowPlayerDialog(,1000000, DIALOG_STYLE_MSGBOX, "Notice", messagesend, "Close", "");
                }
            }



Re: Admin Help in dialog {script help} - Jarnu - 07.09.2012

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) {
if(PlayerInfo[i][pAdmin] >= 1)
{
ShowPlayerDialog(i,1000000, DIALOG_STYLE_MSGBOX, "Notice", messagesend, "Close", "");
}
it will help.. for sure ^^


Re: Admin Help in dialog {script help} - zT KiNgKoNg - 07.09.2012

thanks for this it helps but its not showing the dialog


Re: Admin Help in dialog {script help} - Jarnu - 07.09.2012

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) {
if(PlayerInfo[i][pAdmin] >= 1) {
if(IsPlayerConnected(i)) {
ShowPlayerDialog(i,1000000, DIALOG_STYLE_MSGBOX, "Notice", messagesend, "Close", "");
}
}
}
forgot to check if the player is connected.. please try now.


Re: Admin Help in dialog {script help} - zT KiNgKoNg - 07.09.2012

ok one problem its now showing the response dialog how do i make it so when they click send it then does it


Re: Admin Help in dialog {script help} - Jarnu - 07.09.2012

uh.. didn't got you. explain please

and +rep please :P


Re: Admin Help in dialog {script help} - zT KiNgKoNg - 07.09.2012

ok ill explain

i type /help then click on request admin help then its automatically sends the message it to me when i didn't enter one also its get not got


Re: Admin Help in dialog {script help} - Cjgogo - 07.09.2012

Quote:
Originally Posted by Jarnu
Посмотреть сообщение
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) {
if(PlayerInfo[i][pAdmin] >= 1) {
if(IsPlayerConnected(i)) {
ShowPlayerDialog(i,1000000, DIALOG_STYLE_MSGBOX, "Notice", messagesend, "Close", "");
}
}
}
forgot to check if the player is connected.. please try now.
Well, as I am concerned, now it's NOT NEEDED anymore(in fact useless), to check if a player is connected when writing a code(unless it's a param containing command).It won't be causing any bugs, if you don't check the fact that the player is connected.AND SERIOUSLY, dialogid is 1 million, that is far away OVER THE ALLOWED limit of dialogs that can be displayed.Limit is 32767.


Re: Admin Help in dialog {script help} - zT KiNgKoNg - 07.09.2012

well put it this way its got a glitch


Re: Admin Help in dialog {script help} - zT KiNgKoNg - 07.09.2012

bump