10.04.2016, 09:01
I am having a problem. When I type /ghelp, it shows me the dialog it is supposed to show. But when I click on the on the first listitem in the dialog, it doesnt show me the dialog it is supposed to show. Can anybody help me?
PHP код:
#include <a_samp>
#include <zcmd>
#define DIALOGID_RULES 1
#define DIALOGID_HELP DIALOGID_RULES+48
#define DIALOGID_GHELP DIALOGID_RULES+49
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_YES)
{
new string[700];
strcat(string, "{FFFF00}•{FFFFFF} General Help\t\t\t {999999}[/ghelp]\t\n{FFFF00}•{FFFFFF} Server Commands\t\t {999999}[/cmds]\n{FFFF00}•{FFFFFF} Server Teleports\t\t {999999}[/teles]\n{FFFF00}•{FFFFFF} Vehicle Menu\t\t\t {999999}[/v]\n");
strcat(string, "{FFFF00}•{FFFFFF} Premium Features\t\t{999999} [/premium]\n{FFFF00}•{FFFFFF} Server Credits\t\t {999999}[/credits]\n{FFFF00}•{FF99FF} My Settings\n{FFFF00}•{FF99FF} My Statistics\n{FFFF00}•{FFFFFF} How do I earn Money / Score?\n{FFFF00}•{FFFFFF} What can I do on this server?\n{FFFF00}•{999999} Server IP");
ShowPlayerDialog(playerid, DIALOGID_HELP, DIALOG_STYLE_LIST, "{0000FF}USF: {FFFFFF}Help", string, "Select", "Cancel");
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == DIALOGID_HELP) {
if(response) {
switch(listitem) {
case 0: GHelp(playerid);
}
}
}
return 1;
}
CMD:ghelp(playerid)
{
GHelp(playerid);
return 1;
}
stock GHelp (playerid)
{
new string[1000];
strcat(string, "{0000FF}Commands and Teleports\n{FFFFFF}You can access Commands using /cmds and Teleports using /teles.\n\n");
strcat(string, "{0000FF}Vehicles\n{FFFFFF}You can spawn a vehicle anytime using /v.\n");
strcat(string, "{FFFFFF}You can use /car to spawn a vehicle by name.\n");
strcat(string, "{FFFFFF}Type /vcmds to access Vehicle commands.\n\n");
strcat(string, "{0000FF}Minigames\n{FFFFFF}This server features many minigames such as:\n{FFFFFF}/CnR /Fallout /Event\n\n");
strcat(string, "{0000FF}Premium and VIP\n{FFFFFF}You can access premium commands through donating.\n");
strcat(string, "{FFFFFF}Commands and Features are listed on /premium, visit our website for more info.\n\n");
strcat(string, "{0000FF}Gangs\n{FFFFFF}A Gang System with capturable zones will be added soon.\n\n");
strcat(string, "{0000FF}Houses\n{FFFFFF}You can buy house by going on the House icon and doing /buyhouse.\n\n");
strcat(string, "{9999FF}Need more help? Visit our forums at www.comingsoon.com!");
ShowPlayerDialog(playerid, DIALOGID_GHELP, DIALOG_STYLE_MSGBOX, "{0000FF}USF: {FFFFFF}General Help", string, "Ok", "");
}