map selection on voting [ need help ]
#1

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.
Reply
#2

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!");
}
}
}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)