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: Menu (
/showthread.php?tid=257419)
Menu -
Ghost_BB - 25.05.2011
Hello
How could i script something like this:
Player Connects,picks his Skin,then before spawning a Dialog Shows,then by the Option he choses,he spawns.
Re: Menu -
futuretrucker - 25.05.2011
You could do something like this
pawn Код:
public OnPlayerConnect
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Army skin \n Cop skin", "Ok", "Cancel");
return 1;
}
then for the dialog responce
pawn Код:
if(dialogid == 1)
{
if(response)
{
switch(listitem)
{
case 0:
{
SendClientMessage(playerid, 0xFFFFFFAA, "You have switched to a army skin.");
ShowPlayerDialog(playerid, DIALOG_STYLE_LIST, 2, "Spawn 1 \n Spawn 2");
SetPlayerSkin(playerid, 287);
}
case 1:
{
SendClientMessage(playerid, 0xFFFFFFAA, "You have switched to a cop skin.");
ShowPlayerDialog(playerid, DIALOG_STYLE_LIST, 2, "Spawn 1 \n Spawn 2");
SetPlayerSkin(playerid, 277);
}
}
}
return 1;
}
if(dialogid == 2)
{
if(responce)
{
switch(listitem)
{
case 0:
{
SetPlayerPos(playerid, 192, 1944, 1313);
SendClientMessage(playerid, color, "Youve spawned at sf AP");
}
case 1:
{
SetPlayerPos(playerid, 134,245,2435);
SendClientMessage(playerid, color, "Youve spawned at Ls AP");
}
}
}
return 1;
}
return 1;
}
Sorry for the bad indentations ;P
Re: Menu -
Ghost_BB - 25.05.2011
no,not like that,i said
after he picks his Skin,without spawning the menu shows.