Help - Dialog
#1

Can someone help, i want to make this dialog list than when they press on the rules or something, this dialog pops up with info:

Example:

http://tinypic.com/view.php?pic=28hm...7#.U_2LWsVdVIE

pawn Код:
ShowPlayerDialog(playerid, DIALOG_STYLE_LIST, "Help List", "The Rules\nGuides\nBasic Commands\nJob Commands\nEconomy", "Select", "Close");
 
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_The_Rules)
    {
        if(response)
        {
           
            }
        }
        return 1;
    }
 
    return 0;
}
Reply
#2

correction:

it's ShowPlayerDialog(playerid, DIALOG_ID, STYLE

not ShowPlayerDialog(playerid, STYLE

change the dialog_id with the id you want
Reply
#3

pawn Код:
ShowPlayerDialog(playerid, DIALOG_STYLE_MSGBOX , "Help List", "The Rules\nGuides\nBasic Commands\nJob Commands\nEconomy", "Select", "Close"); public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){    if(dialogid == DIALOG_The_Rules)    {        if(response)         {                        }        }        return 1;    }     return 0;}

EDIT: Use DIALOG_STYLE_MSGBOX instead of DIALOG_STYLE_LIST
Reply
#4

Well, i've tried doing tabs like The Rules under it Guides but it didn't work.

Can someone help?


pawn Код:
#include <a_samp>
#include <ZCMD>

#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
#define COL_BLUE     "{345ACF}"

#define DIALOG_RULES 999
#define DIALOG_ID 999
#define STYLE 999


CMD:help(playerid,params[])
{
    ShowPlayerDialog(playerid, DIALOG_ID, STYLE, "Help List", "\nThe Rules\nGuides\nBasic Commands\nJob Commands\nEconomy", "Select", "Close");
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_STYLE_MSGBOX)
    {
        if(response)
        {
        new pDialog[2500];
        strcat(pDialog, ""COL_WHITE"Here are some "COL_RED"rules "COL_WHITE"that you should respect:\n");
        strcat(pDialog, ""COL_WHITE""COL_RED""COL_WHITE"\n");
        strcat(pDialog, ""COL_GREEN"1. "COL_WHITE"You are not allowed to spam.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"Spamming any websites\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"Spamming any ips/products or any words\n");
        strcat(pDialog, ""COL_WHITE""COL_RED""COL_WHITE"\n");
        strcat(pDialog, ""COL_GREEN"2. "COL_WHITE"You are not allowed to advertise.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"Advertising any ips/community.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"Advertising any products.\n");
        strcat(pDialog, ""COL_WHITE""COL_RED""COL_WHITE"\n");
        strcat(pDialog, ""COL_GREEN"3. "COL_WHITE"You are not allowed to cheat/hack.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"Includes any mods such as Parkour mods.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"Even any mods that gives you advatages more than normally.\n");
        strcat(pDialog, ""COL_WHITE""COL_RED""COL_WHITE"\n");
        strcat(pDialog, ""COL_GREEN"4. "COL_WHITE"You are not allowed to deathmatch.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"You are not allowed to shoot civlians.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"You cannot randomly shoot cops without any reason.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"If you have a job such as farmer, you cannot have a gun license/deathmatch.\n");
        strcat(pDialog, ""COL_WHITE""COL_RED""COL_WHITE"\n");
        strcat(pDialog, ""COL_GREEN"5. "COL_WHITE"You are not allowed to insult others.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"Constant insulting is bannable but remember this is an 18+ game so, minor insults will be ignored.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"Constant reporting players for minor insults will also lead to a ban - Report hunting.\n");
        strcat(pDialog, ""COL_WHITE""COL_RED""COL_WHITE"\n");
        strcat(pDialog, ""COL_GREEN"6. "COL_WHITE"You are not allowed to beg for admin.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"You cannot ask to be an admin/annoy them, constant doing this will result in a punishment.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"Trying to do more than that will result in a ban.\n");
        strcat(pDialog, ""COL_WHITE""COL_RED""COL_WHITE"\n");
        strcat(pDialog, ""COL_GREEN"7. "COL_WHITE"Scamming rules:.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"You can only scam at a limit of 10,000.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"You cannot scam NFG Points nor any Houses/Busniess, if you do so you'll be banned.\n");
        strcat(pDialog, ""COL_WHITE""COL_RED""COL_WHITE"\n");
        strcat(pDialog, ""COL_GREEN"8. "COL_WHITE"About Bugs and Glitches:.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"You cannot bug abuse nor tr and glitch something out, that includes NO CBUG.\n");
        strcat(pDialog, ""COL_GREEN"- "COL_WHITE"If you get caught doing such thing it may lead to a big punishment or a ban.\n");
        strcat(pDialog, ""COL_WHITE""COL_RED""COL_WHITE"\n");
        strcat(pDialog, ""COL_WHITE"There are more rules in "COL_GREEN"Forums"COL_WHITE"! Please check\n");
        ShowPlayerDialog(playerid, DIALOG_RULES, DIALOG_STYLE_MSGBOX, ""COL_BLUE" The Rules", pDialog, "OK", "Cancel");}
        }
    return 1;
    }
Reply
#5

any help pls
Reply
#6

bump
Reply
#7

any help pls?
Reply
#8

https://sampwiki.blast.hk/wiki/How_to_Create_a_Dialog
Read this.

Change STYLE to DIALOG_STYLE_LIST
And DIALOG_ID to any id that hasn't been used
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)