#include <zcmd>
#include <zcmd>
#define TPMENU 1
// Change '1' to whatever dialog ID you want it to be.
CMD:teleport(playerid, params[]) // When we type /teleport
{
return 1;
}
CMD:teleport(playerid, params[])
{
ShowPlayerDialog(playerid, TPMENU, DIALOG_STYLE_LIST, "Teleport Menu", "Police Department\nGym\nGrove Street\nGlen Park\nLas Venturas\nSan Fierro", "Go", "Exit");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == TPMENU)
{
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == TPMENU)
{
if(response) // Clicked 'Go'
{
switch(listitem)
{
}
}
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == TPMENU)
{
if(response) // Clicked 'Go'
{
switch(listitem)
{
case 0: // PD
case 1: // Gym
case 2: // Grove
case 3: // Glen Park
case 4: // LV
case 5: // SF
}
}
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == TPMENU)
{
if(response) // Clicked 'Go'
{
switch(listitem)
{
case 0: SetPlayerPos(playerid,1530,-1674,14); // PD
case 1: SetPlayerPos(playerid,2228,-1741, 14); // Gym
case 2: SetPlayerPos(playerid,2485,1666,14); // Grove
case 3: SetPlayerPos(playerid,1973,-1195,26); // Glen Park
case 4: SetPlayerPos(playerid,2067,1320,11); // LV
case 5: SetPlayerPos(playerid,-2009,164,28); // SF
}
}
}
return 0;
}
#include <zcmd>
#include <a_samp>
#define TPMENU 1
#define TPLS 2
#define TPLV 3
#define TPSF 4
CMD:teleport(playerid, params[]) // When we type /teleport
{
ShowPlayerDialog(playerid, TPMENU, DIALOG_STYLE_LIST, "Teleport Menu", "Los Santos\nLas Venturas\nSan Fierro", "Go", "Exit");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == TPMENU)
{
if(response) // Clicked 'Go'
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid, TPLS, DIALOG_STYLE_LIST, "Teleport Menu", "Police Department\nGym\nGrove Street\nGlen Park", "Go", "Exit");
case 1: ShowPlayerDialog(playerid, TPLV, DIALOG_STYLE_LIST, "Teleport Menu", "Police Department\nGym\nGrove Street\nGlen Park", "Go", "Exit");
case 2: ShowPlayerDialog(playerid, TPSF, DIALOG_STYLE_LIST, "Teleport Menu", "Police Department\nGym\nGrove Street\nGlen Park", "Go", "Exit");
}
}
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == TPLS)
{
if(response) // Clicked 'Go'
{
switch(listitem)
{
case 0: SetPlayerPos Shit here
case 1: SetPlayerPos Shit here
case 2: SetPlayerPos Shit here
case 3: SetPlayerPos Shit here
}
}
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == TPLV)
{
if(response) // Clicked 'Go'
{
switch(listitem)
{
case 0: SetPlayerPos Shit here
case 1: SetPlayerPos Shit here
case 2: SetPlayerPos Shit here
case 3: SetPlayerPos Shit here
}
}
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == TPSF)
{
if(response) // Clicked 'Go'
{
switch(listitem)
{
case 0: SetPlayerPos Shit here
case 1: SetPlayerPos Shit here
case 2: SetPlayerPos Shit here
case 3: SetPlayerPos Shit here
}
}
}
return 0;
}
This is a tutorial on the basics of how to make a teleport menu and you just gave them all a code to copy and paste so they don't learn..
|