[HELP]Create a country menu - 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: [HELP]Create a country menu (
/showthread.php?tid=108533)
[HELP]Create a country menu -
breakpaper - 14.11.2009
How can i create a country menu?
i have this system:
pawn Code:
new city = 1; // 1 = Los Santos, 2 = San Fierro, 3 = DIE!
when he login there come's a menu:
San Fierro
Los Santos
When he select San Fierro the city become's 2 by him
When he select Los Santos the city become's 2 for him
i don't understand the wiki from showplayerdialog, so don't say:
wiki.sa-mp.com
Re: [HELP]Create a country menu -
niCe - 14.11.2009
Post your code so we can see what's wrong.
Re: [HELP]Create a country menu -
breakpaper - 14.11.2009
i have nothing do wrong
i just asking if you can make something like that
but i am now here:
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(!response) SendClientMessage(playerid, 0xFFFFFFFF, "You canceled!");
new message[196];
format(message, sizeof(message), "You are teleported to: %s", inputtext);
SendClientMessage(playerid, 0xFFFFFFFF, message);
return 1;
}
return 0;
}
and the dialog:
pawn Code:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"City Spawn","San Fierro\nLos Santos","Spawn","Cancel");
how to make now that if he select: Los santos
he goes to a position?
Re: [HELP]Create a country menu -
niCe - 14.11.2009
Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
if (dialogid == 1) {
if (!response) {SendClientMessage(playerid, 0xFFFFFFFF, "You canceled!"); return false;}
new message[196];
format(message, sizeof(message), "You are teleported to: %s", inputtext);
SendClientMessage(playerid, 0xFFFFFFFF, message);
if (listitem == 1) {SetPlayerPos(playerid, x, y, z);} //san fiero
else if (listitem == 2) {SetPlayerPos(playerid, x, y, z);} //los santos
return true;
}
return false;
}
You need to decide where to teleport the player due to listitem value. I'm not sure if first item in list starts with 0 or 1, in the example I presumed it starts with 1.