06.12.2016, 08:39
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:
And thats OnDialogResponse
And of course when i do a simply command like /pm it shows that im not spawned D:
Код HTML:
http://i.imgur.com/JhZhutM.png
Код HTML:
http://i.imgur.com/Pb5gWTZ.jpg
Код:
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", "" ); }
Код:
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 ); } } }