GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: BoSS - 2012. február 23. - 17:54:03

Cím: Dialogos teleport
Írta: BoSS - 2012. február 23. - 17:54:03
Hali...azt szeretném kérdezni,hogy a teleportokat hogy tudom be helyettesíteni,hogy DIALOG-ban mutassa és rákattintva teleportáljon.?
Cím: Dialogos teleport
Írta: nyE - 2012. február 23. - 18:22:13

#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! ;)
Cím: Dialogos teleport
Írta: Flash - 2012. február 23. - 18:30:38
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
Cím: Dialogos teleport
Írta: BoSS - 2012. február 23. - 18:54:25
Köszönöm szépen mind kettõknek megy a pluszotok.