SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 15/10/2013, 02:50 PM   #1
Unri
Big Clucker
 
Join Date: Sep 2013
Posts: 102
Reputation: 4
Default Could someone explain me how to make a dynamic dutymenu like on highrise roleplay and next generation roleplay.

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.
Unri is offline   Reply With Quote
Old 15/02/2019, 04:52 PM   #2
AssadMota
Little Clucker
 
Join Date: Jun 2017
Posts: 13
Reputation: 0
Default Re: Could someone explain me how to make a dynamic dutymenu like on highrise roleplay and next generation roleplay.

no.......................
AssadMota is offline   Reply With Quote
Old 15/02/2019, 08:50 PM   #3
polygxn
Big Clucker
 
polygxn's Avatar
 
Join Date: Dec 2018
Location: Hungary
Posts: 75
Reputation: 1
Default Re: Could someone explain me how to make a dynamic dutymenu like on highrise roleplay and next generation roleplay.

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".
polygxn is offline   Reply With Quote
Old 15/02/2019, 08:51 PM   #4
TokicMajstor
Big Clucker
 
TokicMajstor's Avatar
 
Join Date: Oct 2018
Location: Bosnia And Herzegovina
Posts: 158
Reputation: 1
Default Re: Could someone explain me how to make a dynamic dutymenu like on highrise roleplay and next generation roleplay.

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


If Iam better than you = you're noob
If you're better than me = you're cheater
If everyone is better than me = I have lags
#Logic
TokicMajstor is offline   Reply With Quote
Old 15/02/2019, 09:29 PM   #5
ItsRobinson
Big Clucker
 
ItsRobinson's Avatar
 
Join Date: Sep 2017
Posts: 98
Reputation: 16
Default Re: Could someone explain me how to make a dynamic dutymenu like on highrise roleplay and next generation roleplay.

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
__________________


ItsRobinson is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[GameMode] Highrise Gaming Roleplay [95k - SQL - Dynamic] Skyrise Gamemode Scripts 169 22/01/2013 03:52 AM
[Tutorial] [VIDEO]setting up Highrise Gaming Roleplay [95k - SQL - Dynamic] Video Tutorial archblade Tutorials 0 20/01/2013 07:25 PM


All times are GMT. The time now is 08:38 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.