map selection on voting [ need help ] - 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)
+--- Thread: map selection on voting [ need help ] (
/showthread.php?tid=478642)
map selection on voting [ need help ] -
Sands - 30.11.2013
i was thinking to make a dialog and when players click on that dialog. the variable get's increased.
i am using variable, "currentgamemode = 0" for map 1, "currentgamemode = 1" for map 2 and similarly for other maps.
As i didn't ever created this type of stuff so i am not sure how to create this :/
can any body give me the idea of creating it.
Thank You.
Re: map selection on voting [ need help ] -
carloLT - 30.11.2013
In some command or etc:
pawn Код:
ShowPlayerDialog( playerid, YOUR_DIALOG_ID, DIALOG_STYLE_LIST, "Map voting", "First Map\nSecond Map", "Select", "Close" );
In OnDialogResponse:
pawn Код:
if( dialogid == YOUR_DIALOG_ID )
{
if(response)
{
switch(listitem)
{
case 0:
{
currentgamemode = 0;
SendClientMessage(playerid, 0xFFFFFFFF, "You've chosen First Map!");
}
case 1:
{
currentgamemode = 1;
SendClientMessage(playerid, 0xFFFFFFFF, "You've chosen Second Map!");
}
}
}
}