how to get this menu?
#1

i found this menu in a gamemode, but i dont know the command to make it pop up, what should i look for? or how do i find it?

Код:
TurfWarsAdminMenu(playerid)
{
	new string[128];
	format(string,sizeof(string),"Edit Turfs...\nEdit Family Colors...");
	ShowPlayerDialog(playerid,TWADMINMENU,DIALOG_STYLE_LIST,"Turf Wars - Admin Menu:",string,"Select","Exit");
}

TurfWarsEditTurfsSelection(playerid)
{
	new string[2048];
	for(new i = 0; i < MAX_TURFS; i++)
	{
	    if(TurfWars[i][twOwnerId] != -1)
	    {
	        if(TurfWars[i][twOwnerId] < 0 || TurfWars[i][twOwnerId] > MAX_FAMILY-1)
	        {
	        	format(string,sizeof(string),"%s%s - \t(Invalid Family)\n",string,TurfWars[i][twName]);
			}
			else
			{
			    format(string,sizeof(string),"%s%s - \t(%s)\n",string,TurfWars[i][twName],FamilyInfo[TurfWars[i][twOwnerId]][FamilyName]);
			}
	    }
	    else
	    {
	        format(string,sizeof(string),"%s%s - \t(%s)\n",string,TurfWars[i][twName],"Vacant");
	    }
	}
	ShowPlayerDialog(playerid,TWEDITTURFSSELECTION,DIALOG_STYLE_LIST,"Turf Wars - Edit Turfs Selection Menu:",string,"Select","Back");
}

TurfWarsEditTurfsMenu(playerid)
{
	new string[128];
	format(string,sizeof(string),"Edit Dimensions...\nEdit Owners...\nEdit Vulnerable Time...\nEdit Locked...\nEdit Perks...\nReset War...\nDestroy Turf");
	ShowPlayerDialog(playerid,TWEDITTURFSMENU,DIALOG_STYLE_LIST,"Turf Wars - Edit Turfs Menu:",string,"Select","Back");
}

TurfWarsEditTurfsOwner(playerid)
{
	new string[128];
	format(string,sizeof(string),"Please enter a family id that you wish to assign to this turf:\n\nHint: Enter -1 if you wish to vacant the turf.");
	ShowPlayerDialog(playerid,TWEDITTURFSOWNER,DIALOG_STYLE_INPUT,"Turf Wars - Edit Turfs Owner Menu:",string,"Change","Back");
}

TurfWarsEditTurfsVul(playerid)
{
	new string[128];
	format(string,sizeof(string),"Please enter a Vulnerable countdown time for the turf:");
	ShowPlayerDialog(playerid,TWEDITTURFSVUL,DIALOG_STYLE_INPUT,"Turf Wars - Edit Turfs Vulnerable Menu:",string,"Change","Back");
}

TurfWarsEditTurfsLocked(playerid)
{
	new string[128];
	format(string,sizeof(string),"Lock\nUnlock");
	ShowPlayerDialog(playerid,TWEDITTURFSLOCKED,DIALOG_STYLE_LIST,"Turf Wars - Edit Turfs Locked Menu:",string,"Change","Back");
}

TurfWarsEditTurfsPerks(playerid)
{
	new string[128];
	format(string,sizeof(string),"None\nExtortion");
	ShowPlayerDialog(playerid,TWEDITTURFSPERKS,DIALOG_STYLE_LIST,"Turf Wars - Edit Turfs Perks Menu:",string,"Change","Back");
}

TurfWarsEditFColorsSelection(playerid)
{
	new string[1024];
	for(new i = 0; i < MAX_FAMILY; i++)
	{
	    format(string,sizeof(string),"%s(ID: %d) %s - (%d)\n",string,i,FamilyInfo[i][FamilyName],FamilyInfo[i][FamilyColor]);
	}
	ShowPlayerDialog(playerid,TWEDITFCOLORSSELECTION,DIALOG_STYLE_LIST,"Turf Wars - Edit Family Colors Selection:",string,"Select","Back");
}

TurfWarsEditFColorsMenu(playerid)
{
	new string[128];
	format(string,sizeof(string),"Please enter a family color id that wish to assign to the family:\n");
	ShowPlayerDialog(playerid,TWEDITFCOLORSMENU,DIALOG_STYLE_INPUT,"Turf Wars - Edit Family Colors Menu:",string,"Select","Back");
}
Reply
#2

To make a dialog "pop up" you need ShowPlayerDialog, But I don't really understand what part you need.
Reply
#3

Quote:
Originally Posted by brett7
Посмотреть сообщение
To make a dialog "pop up" you need ShowPlayerDialog, But I don't really understand what part you need.
The gamemode is already done and complete, i didnt script the gamemode, i did ctrl+f in pawno to look for the comand to edit the turfs dinamically in game, but all i found is that code, that i think is a dialog where you can edit the turfs am i right?, now i want to know how to find the comand in the gamemode pwn file to make that dialog appear, in few words i want to know the command to edit turfs.
Reply
#4

The id of the dialog appears to be 'TWEDITTURFSSELECTION' so I would search for that. Should be under on dialog response.
Reply
#5

Thank you , i found the command, after a "CMD:", it was above all the code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)