Could someone explain me how to make a dynamic dutymenu like on highrise roleplay and next generation roleplay.
#1

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

no.......................
Reply
#3

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".
Reply
#4

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)