SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 22/03/2009, 02:17 PM   #1
zanakinz
Big Clucker
 
Join Date: Jan 2009
Posts: 69
Reputation: 0
Default How to make a menu and how to make it have teleport options

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
zanakinz is offline  
Old 22/03/2009, 02:22 PM   #2
Rks25
High-roller
 
Join Date: Jun 2007
Posts: 1,071
Reputation: 6
Default Re: How to make a menu and how to make it have teleport options

Search for this in general reference and wiki and other topics.
Rks25 is offline  
Old 22/03/2009, 03:10 PM   #3
zanakinz
Big Clucker
 
Join Date: Jan 2009
Posts: 69
Reputation: 0
Default Re: How to make a menu and how to make it have teleport options

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 (c) 1997-2006, ITB CompuPhase


4 Errors.
zanakinz is offline  
Old 22/03/2009, 03:12 PM   #4
Dujma
Huge Clucker
 
Join Date: Jul 2008
Posts: 415
Reputation: 0
Default Re: How to make a menu and how to make it have teleport options

Again.... Wiki

http://wiki.sa-mp.com/wiki/Creating_a_simple_Menu
Dujma is offline  
Old 22/03/2009, 03:38 PM   #5
zanakinz
Big Clucker
 
Join Date: Jan 2009
Posts: 69
Reputation: 0
Default Re: How to make a menu and how to make it have teleport options

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 (c) 1997-2006, ITB CompuPhase


4 Errors.
zanakinz is offline  
Old 22/03/2009, 03:40 PM   #6
Rks25
High-roller
 
Join Date: Jun 2007
Posts: 1,071
Reputation: 6
Default Re: How to make a menu and how to make it have teleport options

you cant just copy/paste...
Rks25 is offline  
Old 22/03/2009, 03:58 PM   #7
zanakinz
Big Clucker
 
Join Date: Jan 2009
Posts: 69
Reputation: 0
Default Re: How to make a menu and how to make it have teleport options

Well i dont know what to do so all i know is to copy and paste in dis situation..
zanakinz is offline  
Old 22/03/2009, 04:39 PM   #8
*ToM*
Huge Clucker
 
Join Date: Mar 2009
Posts: 493
Reputation: 0
Default Re: How to make a menu and how to make it have teleport options

http://wiki.sa-mp.com/wiki/Creating_a_simple_Menu

for god sake, its not hard Learn and practice !
*ToM* is offline  
Old 22/03/2009, 04:41 PM   #9
zanakinz
Big Clucker
 
Join Date: Jan 2009
Posts: 69
Reputation: 0
Default Re: How to make a menu and how to make it have teleport options

DL teamviewer and add my msn busteriscute2006@hotmail.com

IT AINT WORKING!!!!
zanakinz is offline  
Old 05/04/2011, 12:55 AM   #10
PCheriyan007
Huge Clucker
 
Join Date: May 2010
Location: in hiding
Posts: 288
Reputation: 6
Lightbulb Re: How to make a menu and how to make it have teleport options

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

Code:
[Filterscripts]
Nothing So Far
[Tutorials]
How to use SQLite (by Zh3r0)
How to stream Shoutcast to your server
[Current Project]
[DR]Drifting Roaches (Server)
PCheriyan007 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a menu? THE NEW TYPE OF MENU, NOT OLD ONE -FIXED- Typical_Cat Help Archive 5 25/04/2010 11:26 PM
I Can't Make a Teleport anonimu45 Help Archive 11 25/10/2009 06:41 PM
[Include] [INC]Teleport include. Make teleport in 1 line! AiVAMAN Includes 2 05/09/2009 02:41 PM


All times are GMT. The time now is 05:24 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.