DIALOG_STYLE_MSGBOX help.
#1

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;
            }
        }
    } 
Reply
#2

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.
Reply
#3

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.
Reply
#4

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.
Reply
#5

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

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
Reply
#7

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
Reply
#8

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

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.

.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)