Dialog Mixed
#1

Hi,

I was trying to solve it out by defining them or whatever, but problem is still here! Used enumerations

Whenever i use command /set dialog will appear with some packs like this, and i have to choose this pack!

Код:
if(dialogid == D_SET)
{
		if (response)
    	switch (listitem)
		{
   			case 0:
			{
				PlayerInfo[ playerid ][ SET ] = 0;
				GiveSet(playerid, 0);
				SendClientMessage(playerid, -1, "You got this set");
			}
				ShowPlayerDialog( playerid, D_SET, DIALOG_STYLE_LIST, "Set", "Standard Set", "Select", "Cancel" );
			}
		}
	}
- Whenever i use this pack when dialog appear i am teleported to this location! What's the problem ? I shouldn't be teleported but it does.+REP if helped

Код:
if(dialogid == D_TELE)
	{
		if(response)
		{
			if(listitem == 0)
			{
				SetPlayerPos(playerid, 2048.1663,-2261.8228,18.5524);
				SetPlayerFacingAngle(playerid, 147.1641);
				SetPlayerInterior(playerid,0);
				SetCameraBehindPlayer(playerid);
				SendClientMessage(playerid, -1, "Teleported");
   			}
		}
	 }
Reply
#2

Have you got any filterscripts in your server? If so, disable them and try again.
Reply
#3

PHP код:
if(dialogid == D_SET)
{
    if (
response)
    {
        switch (
listitem)
        {
               case 
0:
            {
                
PlayerInfoplayerid ][ SET ] = 0;
                
GiveSet(playerid0);
                
SendClientMessage(playerid, -1"You got this set");
            }
            
ShowPlayerDialogplayeridD_SETDIALOG_STYLE_LIST"Set""Standard Set""Select""Cancel" );
        }
    }
}
if(
dialogid == D_TELE)
{
    if(
response)
    {
        switch (
listitem)
        {
               case 
0:
            {
                
SetPlayerPos(playerid2048.1663,-2261.8228,18.5524);
                
SetPlayerFacingAngle(playerid147.1641);
                
SetPlayerInterior(playerid,0);
                
SetCameraBehindPlayer(playerid);
                
SendClientMessage(playerid, -1"Teleported");
            }
        }
    }

Since both dialogs have 1 list item only, so whenever you'll open the dialog & select first item it will do the action according to the dialog (in case 2 it will teleport you).
Reply
#4

But what if i use more list item ?
Reply
#5

Quote:
Originally Posted by iLearner
Посмотреть сообщение
PHP код:
if(dialogid == D_SET)
{
    if (
response)
    {
        switch (
listitem)
        {
               case 
0:
            {
                
PlayerInfoplayerid ][ SET ] = 0;
                
GiveSet(playerid0);
                
SendClientMessage(playerid, -1"You got this set");
            }
            
ShowPlayerDialogplayeridD_SETDIALOG_STYLE_LIST"Set""Standard Set""Select""Cancel" );
        }
    }
}
if(
dialogid == D_TELE)
{
    if(
response)
    {
        switch (
listitem)
        {
               case 
0:
            {
                
SetPlayerPos(playerid2048.1663,-2261.8228,18.5524);
                
SetPlayerFacingAngle(playerid147.1641);
                
SetPlayerInterior(playerid,0);
                
SetCameraBehindPlayer(playerid);
                
SendClientMessage(playerid, -1"Teleported");
            }
        }
    }

Since both dialogs have 1 list item only, so whenever you'll open the dialog & select first item it will do the action according to the dialog (in case 2 it will teleport you).
Problem is same, whenever i choose 1st weapon set i got teleported to case 0;
Reply
#6

Show me your ShowPlayerDialog's.
Reply
#7

Teleport

Код:
ShowPlayerDialog(playerid, D_TELE, DIALOG_STYLE_TABLIST_HEADERS
Код:
if(dialogid == D_TELE)
	{
		if(response)
		{
			if(listitem == 0)
			{
				ShowPlayerDialog(playerid, D_TELE+1, DIALOG_STYLE_TABLIST_HEADERS, "TELES", "Teleports\tCommand\nLos Santos Airport", "Port", "Cancel");
			}
SET

Код:
ShowPlayerDialog( playerid, D_SET, DIALOG_STYLE_LIST, "Set", "Standard Set", "Select", "Cancel" );
Reply
#8

Dialog IDs can't be reused as iLearner said.

Show us the lines where you define these dialogs, why you add +1 to D_TELE and, are you using any filterscripts?
Reply
#9

Here you go, No, I don't use any FS

Код:
CMD:tele( playerid )
{
	ShowPlayerDialog(playerid, D_TELE, DIALOG_STYLE_TABLIST_HEADERS, "TELE", "Teleports\tCommands\nStunt Zones\t(/stunt)", "Select", "Close");
	return 1;
}
	if(dialogid == D_TELE)
    {
		if(response)
		{
   			if(listitem == 0)
			{
				ShowPlayerDialog(playerid, D_TELE+1, DIALOG_STYLE_TABLIST_HEADERS, "STUNTS", "Teleport\tCommand\nLos Santos Airport\t(/lsa)", "Port", "Cancel");
			}
   			return 1;
   		}
  	}
	if(dialogid == D_TELE+1)
	{
		if(response)
		{
      		if(listitem == 0)
			{
				SetPlayerPos(playerid, 2048.1663,-2261.8228,18.5524);
				SetPlayerFacingAngle(playerid, 147.1641);
				SetPlayerInterior(playerid,0);
				SetCameraBehindPlayer(playerid);
				SendClientMessage(playerid, -1, "Teleported!");
   			}
		}
	}
	if(dialogid == D_SET)
	{
		if (response)
		{
    		switch (listitem)
			{
   				case 0:
				{
					PlayerInfo[ playerid ][ SET ] = 0;
					GiveWeaponSet(playerid, 0);
					SendClientMessage(playerid, -1, "You choose this set");
				}
   			}
		}
 	}
Reply
#10

Can you for the sake of God show us the lines where you #DEFINE these dialogs?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)