Dialog box help
#1

I created a Dialog Box for help topics for my server. But when i click Cancel Button in it it kicks me from the server. What is the problem??
Reply
#2

can you post the script?
Reply
#3

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

#define FILTERSCRIPT
#define help 1337
#define COLOR_RED 0xAA3333AA

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

#endif

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/help", true) == 0)
{
ShowPlayerDialog(playerid, help, DIALOG_STYLE_LIST, "Help Topics","Rules\nObjectives\nCommands", "Select", "Cancel");
return 1;
}
return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == help)
{
if(response)
{
if(listitem == 0) // 24/7
{
ShowPlayerDialog(playerid, help+1, DIALOG_STYLE_MSGBOX, "Rules in the server", "This server is a DM/Freeeroam/Stunt server. You must follow the rules \nor you will be kicked/banned form the server. Thank you. \nDO'S \nIn the server, you can fight, freely roam about and perform stunts if you wish. \nThere are various commands and fightclubs where you can challenge others to fight.\nBack", "Select", "Quit");
}
if(listitem == 1) // Airports
{
ShowPlayerDialog(playerid, help+2, DIALOG_STYLE_MSGBOX, "Objectives", "\nBack", "Select", "Cancel");
}
if(listitem == 2) // Ammunations
{
ShowPlayerDialog(playerid, help+3, DIALOG_STYLE_LIST, "Commands", "General\nTeleports\nFighting\nBack", "Select", "Quit");
}
//RULES//
if(dialogid == help+1) // Rules
{
if(response)
{
if(listitem == 7) // LV
{
ShowPlayerDialog(playerid, help, DIALOG_STYLE_LIST, "Help Topics","Rules\nObjectives\nCommands", "Select", "Quit");
}
}
}
//OBJECTIVE//
if(dialogid == help+2) //Objectives
{
if(response)
{
if(listitem == 1) // back
{
ShowPlayerDialog(playerid, help, DIALOG_STYLE_LIST, "Help Topics","Rules\nObjectives\nCommands", "Select", "Quit");
}
}
}
//COMMANDS//
if(dialogid == help+3) // Commands
{
if(response)
{
if(listitem == 1) // General
{
ShowPlayerDialog(playerid, help, DIALOG_STYLE_MSGBOX, "General","/stats - Shows your kill death ratio.\n/pm id message - Sends a personal message to the player\n/reply (or) /r - Replies to the personal message. \n /kill - Commite a suicide.", "Select", "Quit");
}
if(listitem == 2)
{
ShowPlayerDialog(playerid, help, DIALOG_STYLE_MSGBOX, "Teleports", "/teleport - Allows you to teleport to a selected location.print \n\n NOTE : Each teleport will cost you depending ont he place you teleport.","Select", "Quit");
}
}
}
}
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)