Help with dialogresponse
#1

I scripted a dialog, i did everything but when i connect to the server and click on "Spawn" (dialog button) the player does not spawn correct that's what i occurred:
thats what the dialog looks like on a screenshot:

This is the dialog:

Код:
	case DIALOG_SWITCH_TEAM_WELCOME:
		{
			if ( serverData[ cw_enabled ] )
		    {
				new ent[ 256 ];

		        switch ( serverData[ cw_state ] )
		        {
					case 0: format( ent, sizeof( ent ), "{"ATT_TCOLOR"}» %s (Attackers)\n{"DEF_TCOLOR"}» %s (Defenders)\n{"REF_TCOLOR"}» "REF_NAME"\n{C3C3C3}» SUB %s (Attackers)\n{C3C3C3}» SUB %s (Defenders)", clanWar[ 0 ][ team_name ], clanWar[ 1 ][ team_name ], clanWar[ 0 ][ team_name ], clanWar[ 1 ][ team_name ] );
					case 1: format( ent, sizeof( ent ), "{"DEF_TCOLOR"}» %s (Defenders)\n{"ATT_TCOLOR"}» %s (Attackers)\n{"REF_TCOLOR"}» "REF_NAME"\n{C3C3C3}» SUB %s (Defenders)\n{C3C3C3}» SUB %s (Attackers)", clanWar[ 0 ][ team_name ], clanWar[ 1 ][ team_name ], clanWar[ 0 ][ team_name ], clanWar[ 1 ][ team_name ] );
				}

				ShowPlayerDialog( playerid, DIALOG_SWITCH_TEAM_WELCOME, DIALOG_STYLE_LIST, "[EvO]EvOlutioN: Select a Team", ent, "Spawn", "" );
			}
			else
				ShowPlayerDialog( playerid, DIALOG_SWITCH_TEAM_WELCOME, DIALOG_STYLE_LIST, "[EvO]EvOlutioN: Select a Team", "{"ATT_TCOLOR"}» Attackers\n{"DEF_TCOLOR"}» Defenders\n{"REF_TCOLOR"}» "REF_NAME"\n{999999}» Sub Attackers\n{999999}» Sub Defenders", "Spawn", "" );
		}
And thats OnDialogResponse

Код:
case DIALOG_SWITCH_TEAM_WELCOME:
		{
			switch ( listitem )
			{
			    case 0..2:
			    {
	   				playerData[ playerid ][ P_TEAM ] = listitem;
					playerData[ playerid ][ P_SUB  ] = false;
					SetPlayerColor( playerid, teamColor( listitem, 0 ) );
					spawnLobby( playerid );
					SpawnPlayer( playerid );
				}
	            case 3..4:
	            {
					playerData[ playerid ][ P_TEAM ] = listitem - 3;
					playerData[ playerid ][ P_SUB  ] = true;
					SetPlayerColor( playerid, SUB_COLOR );
					spawnLobby( playerid );
					SpawnPlayer( playerid );
			    }
			}
		}
And of course when i do a simply command like /pm it shows that im not spawned D:
Reply


Messages In This Thread
Help with dialogresponse - by wallen - 06.12.2016, 08:39
Re: Help with dialogresponse - by wallen - 06.12.2016, 09:15
Re: Help with dialogresponse - by wallen - 06.12.2016, 10:13
Re: Help with dialogresponse - by TheRohlikar - 06.12.2016, 11:16
Re: Help with dialogresponse - by wallen - 06.12.2016, 11:51
Re: Help with dialogresponse - by TheRohlikar - 06.12.2016, 11:54
Re: Help with dialogresponse - by wallen - 06.12.2016, 11:56

Forum Jump:


Users browsing this thread: 1 Guest(s)