Szerző Téma: Dialogos teleport  (Megtekintve 724 alkalommal)

Nem elérhető BoSS

  • 816
    • Profil megtekintése
Dialogos teleport
« Dátum: 2012. Február 23. - 17:54:03 »
0 Show voters
Hali...azt szeretném kérdezni,hogy a teleportokat hogy tudom be helyettesíteni,hogy DIALOG-ban mutassa és rákattintva teleportáljon.?

Nem elérhető nyE

  • 1745
    • Profil megtekintése
Dialogos teleport
« Válasz #1 Dátum: 2012. Február 23. - 18:22:13 »
+1 Show voters

#include <a_samp>
#include <zcmd>
#define DIALOGID 1234
CMD:teles(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST,\"Teleportok\",\"Los Santos\\nSan Fierro\\nLas Venturas\",\"Ok\",\"Mégse\");
    return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOGID)
    {
        if(response)
{
    if(listitem == 0)
    {
                SetPlayerPos(playerid, x,y,z);
    }
    if(listitem == 1)
    {
                SetPlayerPos(playerid, x,y,z);
    }
    if(listitem == 2)
    {
                SetPlayerPos(playerid, x,y,z);
    }
        }   
return 1;
    }
    return 0;
}

 
E: Javítva. Köszi az észrevételt Flash! ;)
« Utoljára szerkesztve: 2012. Február 23. - 18:32:19 írta Antonyo »

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
Dialogos teleport
« Válasz #2 Dátum: 2012. Február 23. - 18:30:38 »
+1 Show voters
Egy \\n-t odaírtál és így nem lesz jó!
 
    ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST,\"Teleportok\",\"Los Santos\\n\\nSan Fierro\\nLas Venturas\",\"Ok\",\"Mégse\");

 
Helyett ezt:
 
    ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST,\"Teleportok\",\"Los Santos\\nSan Fierro\\nLas Venturas\",\"Ok\",\"Mégse\");

 
De am jól írtad :D

Nem elérhető BoSS

  • 816
    • Profil megtekintése
Dialogos teleport
« Válasz #3 Dátum: 2012. Február 23. - 18:54:25 »
0 Show voters
Köszönöm szépen mind kettõknek megy a pluszotok.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal