How to make a menu and how to make it have teleport options
#1

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
Reply
#2

Search for this in general reference and wiki and other topics.
Reply
#3

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.
Reply
#4

Again.... Wiki

https://sampwiki.blast.hk/wiki/Creating_a_simple_Menu
Reply
#5

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.
Reply
#6

you cant just copy/paste...
Reply
#7

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

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

for god sake, its not hard Learn and practice !
Reply
#9

DL teamviewer and add my msn busteriscute2006@hotmail.com

IT AINT WORKING!!!!
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)