SA-MP Forums Archive
Could someone explain me how to make a dynamic dutymenu like on highrise roleplay and next generation roleplay. - 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: Could someone explain me how to make a dynamic dutymenu like on highrise roleplay and next generation roleplay. (/showthread.php?tid=469945)



Could someone explain me how to make a dynamic dutymenu like on highrise roleplay and next generation roleplay. - Unri - 15.10.2013

Hello. Could someone explain me how to make a dynamic dutymenu like on highrise roleplay and next generation roleplay. I dont understand how can you make the dialog recognize what weapons are available to the according duty menu.


Re: Could someone explain me how to make a dynamic dutymenu like on highrise roleplay and next generation roleplay. - AssadMota - 15.02.2019

no.......................


Re: Could someone explain me how to make a dynamic dutymenu like on highrise roleplay and next generation roleplay. - polygxn - 15.02.2019

Well maybe if you give us some pictures about the system it would be easier. Its a little bit hard this way to guess what you thinking of under "dynamic dutymenu".


Re: Could someone explain me how to make a dynamic dutymenu like on highrise roleplay and next generation roleplay. - TokicMajstor - 15.02.2019

Do you mean creating player dialog list in which you choose like on duty or off duty


Re: Could someone explain me how to make a dynamic dutymenu like on highrise roleplay and next generation roleplay. - ItsRobinson - 15.02.2019

PHP Code:
#define MainDutyLocker 1 //Examples, if you have dialogs in your script already, change the numbers
#define DutyLockerEquipment 2 //Examples, if you have dialogs in your script already, change the numbers
/*If player types /locker*/
ShowPlayerDialog(playeridMainDutyLockerDIALOG_STYLE_LIST"Locker""On-Duty\nEquipment""Select""Close");
/*Under OnDialogResponse*/
if(dialogid == MainDutyLocker)
{
    if(!
response) return 1//if they press escape or close button it will close the dialog
    
if(listitem == 0//On-Duty
    
{
         
/*your code here*/
         
SendClientMessage(playerid, -1"You're now on-duty."); //Example
    
}
    else if(
listitem == 1//Equipment
    
{
          
ShowPlayerDialog(playeridDutyLockerEquipmentDIALOG_STYLE_LIST"Equipment""Deagle\nShotgun""Select""Back"); //If they click the Equipment option, it will open a new dialog
    
}
}
if(
dialogid == DutyLockerEquipment)
{
    if(!
response) return ShowPlayerDialog(playeridMainDutyLockerDIALOG_STYLE_LIST"Locker""On-Duty\nEquipment""Select""Close"); //if they press Escape or the Back button, it will take them back to the main duty menu
    
if(listitem == 0//Deagle
    
{
         
GivePlayerWeapon(playerid2464); //give the player a deagle with 64 bullets.
    
}
    else if(
listitem == 1//Shotgun
    
{
         
GivePlayerWeapon(playerid2515); //give the player a shotgun with 15 bullets.
    
}

This is the very basics, you gotta learn to do the rest