SA-MP Forums Archive
How to make a menu and how to make it have teleport options - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to make a menu and how to make it have teleport options (/showthread.php?tid=70055)



How to make a menu and how to make it have teleport options - zanakinz - 22.03.2009

Title says most of it.. i need an example of a code and where to put it bcuz im confused (i made a Info Icon spawn at this 1 place and now all i need is it so when i walk onto it it'll pop up a menu and when i press space on E.X "Roof" it will tele me 2 the roof) Can you show me how to do this and what code to use thanks


Re: How to make a menu and how to make it have teleport options - Rks25 - 22.03.2009

Search for this in general reference and wiki and other topics.


Re: How to make a menu and how to make it have teleport options - zanakinz - 22.03.2009

There is BlackFox's MenuMaker but it doesnt really work well... bcuz it is giving me these errors:
Code:
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(503) : error 020: invalid symbol name ""
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(6220) : error 010: invalid function or declaration
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(6224) : error 010: invalid function or declaration
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(6230) : error 017: undefined symbol "menu"
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(6272) : warning 235: public function lacks forward declaration (symbol "OnPlayerSelectedMenuRow1")
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(10543) : warning 213: tag mismatch
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(10544) : warning 213: tag mismatch
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(42176) : warning 203: symbol is never used: "str"
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(44895) : warning 203: symbol is never used: ""
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(44895) : warning 203: symbol is never used: "GetPointDistanceToPointExMorph"
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(44895) : warning 203: symbol is never used: "MafiaMenu"
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(44895) : warning 203: symbol is never used: "adminspec"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: How to make a menu and how to make it have teleport options - Dujma - 22.03.2009

Again.... Wiki

https://sampwiki.blast.hk/wiki/Creating_a_simple_Menu


Re: How to make a menu and how to make it have teleport options - zanakinz - 22.03.2009

I tried the wiki and this is the Errors i get:
Code:
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(6219) : error 010: invalid function or declaration
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(6223) : error 010: invalid function or declaration
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(6491) : error 017: undefined symbol "current"
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(6505) : error 017: undefined symbol "current"
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(42173) : warning 203: symbol is never used: "str"
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(44892) : warning 203: symbol is never used: "GetPointDistanceToPointExMorph"
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(10541) : warning 204: symbol is assigned a value that is never used: "MafiaTele"
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(10541 -- 44892) : warning 203: symbol is never used: "adminspec"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: How to make a menu and how to make it have teleport options - Rks25 - 22.03.2009

you cant just copy/paste...


Re: How to make a menu and how to make it have teleport options - zanakinz - 22.03.2009

Well i dont know what to do so all i know is to copy and paste in dis situation..


Re: How to make a menu and how to make it have teleport options - *ToM* - 22.03.2009

https://sampwiki.blast.hk/wiki/Creating_a_simple_Menu

for god sake, its not hard Learn and practice !


Re: How to make a menu and how to make it have teleport options - zanakinz - 22.03.2009

DL teamviewer and add my msn busteriscute2006@hotmail.com

IT AINT WORKING!!!!


Re: How to make a menu and how to make it have teleport options - PCheriyan007 - 05.04.2011

Try this:
pawn Code:
#define TeleMenu 12345
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/telemenu", cmdtext, true) == 0)
    {
        ShowPlayerDialog(playerid,TeleMenu,DIALOG_STYLE_LIST,"Server Teleports","PlaceName1\r\nPlaceName2\r\nPlaceName3","Teleport", "Close")
        return 1;
    }
    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid) // Lookup the dialogid
    {
        case 12345:
        {
            if(!response)
            {
                SendClientMessage(playerid, 0xFF0000FF, "You have closed the telemenu.");
                return 1; // We processed it
            }
 
            switch(listitem) // This is far more efficient than using an if-elseif-else structure
            {
                case 0: // Listitems start with 0, not 1
                {
                      SetPlayerPos(playerid, x, y, z ); // Change X, Y and Z to the Co-Ords of where you want to teleport.
                      SendClientMessage(playerid,0xFFFFFFAA,"Welcome to your place! Enjoy your stay.");
                }
                case 1:
                {
                      SetPlayerPos(playerid, x, y, z ); // Change X, Y and Z to the Co-Ords of where you want to teleport.
                      SendClientMessage(playerid,0xFFFFFFAA,"Welcome to your place! Enjoy your stay.");
                }
                case 2:
                {
                      SetPlayerPos(playerid, x, y, z ); // Change X, Y and Z to the Co-Ords of where you want to teleport.
                      SendClientMessage(playerid,0xFFFFFFAA,"Welcome to your place! Enjoy your stay.");
                }
                // Add the rest of your listitems for dialog 1 here
 
            }
 
        }
        // Add the rest of your dialogs here
 
    }
    return 0; // If you put return 1 here the callback will not continue to be called in other scripts (filterscripts, etc.).
}
NOTE: Be sure to replace 'x, y, z' with the X, Y and Z coordinates of your places.
NOTE: If you want to add more teleports, look where it says '// Add the rest of your listitems for dialog 1 here' and highlight, copy and paste 'case 2' and everything within the brackets. After you have pasted it under where it says '// Add the rest of your listitems for dialog 1 here' simply rename 'case 2' to 'case 3'.
NOTE: If you need any other help concerning this, just PM me in the forums.