Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:help(playerid, params[])
- {
- ShowPlayerDialog(playerid, help, DIALOG_STYLE_LIST, "Help", "/job\n/earn\n/cmd", "Open", "Close");
- return 1;
- {
- public OnDialogResponse(playerid, help, response, listitem, inputtext[])
- {
- if(response)// They pressed the first button.
- {
- switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
- {
- case 1:// Our dialog!
- {
- switch(listitem)// Checking which listitem was selected
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "Jobs.");
- }
- case 1: // The second item listed
- {
- if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "Earn.");
- }
- case 2: // The third item listed
- {
- if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "cmd.");
- }
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment