SA-MP Forums Archive
[AYUDA] Poner Dialog luego de Spawn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [AYUDA] Poner Dialog luego de Spawn (/showthread.php?tid=564603)



[AYUDA] Poner Dialog luego de Spawn - RobertinoColombo - 22.02.2015

Quisiera saber como pondria para que luego de elegir un equipo de "AddPlayerClass" y presionar "Spawn" que me apareciera un DIALOG_STYLE_LIST para elegir la clase, ej: Asalto, Sniper. Y que cada clase tenga armas diferentes.


Respuesta: [AYUDA] Poner Dialog luego de Spawn - admantis - 22.02.2015

Hola,

Код:
#define DIALOGO_CLASE
public OnPlayerSpawn(playerid)
{
	ShowPlayerDialog(playerid, DIALOGO_CLASE, DIALOG_STYLE_LIST, "Escoge tu clase", "Sniper\nAsalto\nOtra clase", "OK", "");
	return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == DIALOGO_CLASE)
	{
	    switch(listitem)
	    {
	        case 0:
	        {
	            // selecciуn sniper
            }
            case 1:
            {
                // selecciуn asalto
            }
            case 2:
            {
                // selecciуn "otra clase"
            }
        }
    }
    return 1;
 }