SA-MP Forums Archive
DIALOG_STYLE_MSGBOX 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: DIALOG_STYLE_MSGBOX help. (/showthread.php?tid=507624)



DIALOG_STYLE_MSGBOX help. - gtasarules14 - 18.04.2014

Hi, I am using a MSGBOX for a tutorial for my server, but I am using 2 options, when I press the No selection it is supposed to kick you, but nothing happens, I would like some help please, thanks

PHP код:
if(response)
    {
    switch(
dialogid)
        {
        case 
DIALOG_Tutorial:
            {
            if(
response)
                {
                    
SendClientMessage(playerid0xFFFFFF"The tutorial will continue.");
                }
                else
                {
                    
Kick(playerid);
                }
                return 
1;
            }
        }
    } 



Re : DIALOG_STYLE_MSGBOX help. - S4t3K - 18.04.2014

You checks twice "if(response)".

PHP код:

switch(dialogid)
{
    case 
DIALOG_Tutorial:
    {
          if(!
response) return Kick(playerid);
          else return 
SendClientMessage(playerid0xFFFFFFFF"The tutorial will continue.");
    }

Also, the color in the SCM isn't valid at all.

It should look like

0xFFFFFFFF.
The green symbol stands for the HTML colour code.
The red symbol stands for the Alpha value. FF means normal colour message. 00 means invisible message.


Re: DIALOG_STYLE_MSGBOX help. - Konstantinos - 18.04.2014

Quote:
Originally Posted by S4t3K
Посмотреть сообщение
Also, the color in the SCM isn't valid at all.

It should look like

0xFFFFFFFF.
The green symbol stands for the HTML colour code.
The red symbol stands for the Alpha value. FF means normal colour message. 00 means invisible message.
The colour is valid. Any number represents for a colour and it's not possible to get invisible client message.


Re: DIALOG_STYLE_MSGBOX help. - gtasarules14 - 18.04.2014

The same is still happening, the second option does not do anything.

PHP код:
if(response)
    {
    switch(
dialogid)
        {
        case 
DIALOG_Tutorial:
        {
             if(!
response) return Kick(playerid);
             else return 
SendClientMessage(playerid0xFFFFFFFF"The tutorial will continue.");
        }
        }
        return 
1;
    } 
If I take off the first if(response) I get a whole bunch of errors.


Re: DIALOG_STYLE_MSGBOX help. - Conradus - 18.04.2014

Try this:
pawn Код:
if(response)
{
    switch(dialogid)
    {
        case DIALOG_Tutorial:
        {
            SendClientMessage(playerid, 0xFFFFFF, "The tutorial will continue.");
        }
    }
}
else { Kick(playerid); }



Re: DIALOG_STYLE_MSGBOX help. - AchievementMaster360 - 18.04.2014

pawn Код:
switch(dialogid)
        {
        case DIALOG_Tutorial:
        {
             if(response)
            {
                      SendClientMessage(playerid, 0xFFFFFFFF, "The tutorial will continue.");
            }
            else if(!response)
            {
                     Kick(playerid);
             }
        }
        return 1;
    }

Note you need to fix brackets because this is from the iPad


Re: DIALOG_STYLE_MSGBOX help. - gtasarules14 - 18.04.2014

Thank you all for the lovely help <3, Im still new at scripting, but its becoming alot more clear everyday
Thanks everyone for the help

I have it fixed now btw <3

All repped +1


Re : DIALOG_STYLE_MSGBOX help. - S4t3K - 18.04.2014

I know, but I mean just putting the 6 digits of the html colour number is valid ?
HexaDecimal basics are 8 digits, no ?


Re: Re : DIALOG_STYLE_MSGBOX help. - Bingo - 18.04.2014

Quote:
Originally Posted by S4t3K
Посмотреть сообщение
I know, but I mean just putting the 6 digits of the html colour number is valid ?
HexaDecimal basics are 8 digits, no ?
HTML :- {FF0000} (HTML codes as normally like "#FF0000" Just add { and } at start and at end.
Hex :- 0xFF0000FF (HTML codes in hex form, Just add 0x at start and at end FF without brackets.

.