17.11.2012, 18:29
Hey
I have just started with trying to make some dialogs, never done it before.
And my problem is nothing happens when i open the dialog in the game and click on something.
It just jump out of the dialog
I tried to look for some help on the web and on tutorials, but nothing helped.
I maid two different script, to see if it worked. But still the same problem.
I hope someone could help me whit this
Script 1:
Script 2:
I have just started with trying to make some dialogs, never done it before.
And my problem is nothing happens when i open the dialog in the game and click on something.
It just jump out of the dialog
I tried to look for some help on the web and on tutorials, but nothing helped.
I maid two different script, to see if it worked. But still the same problem.
I hope someone could help me whit this
Script 1:
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#define DIALOG_HCPANEL 0
#define DIALOG_COMMANDS 1
#define COLOR_RED 0xFF0000AA
CMD:hcpanel(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_HCPANEL, DIALOG_STYLE_LIST, "Help And Commands", "Commands\nHelp\nTele\nCredits", "Select", "Close");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_HCPANEL)
{
if(response)
{
if(listitem == 0)
{
GivePlayerWeapon(playerid,33,99999);
SendClientMessage(playerid, 0xFFFFFFFF, "message");
}
if(listitem == 1)
{
GivePlayerWeapon(playerid,33,99999);
SendClientMessage(playerid, 0xFFFFFFFF, "message");
}
if(listitem == 2)
{
GivePlayerWeapon(playerid,33,99999);
SendClientMessage(playerid, 0xFFFFFFFF, "message");
}
if(listitem == 3)
{
GivePlayerWeapon(playerid,33,99999);
SendClientMessage(playerid, 0xFFFFFFFF, "message");
}
return 1;
}
}
return 1;
}
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#define DIALOG_HCPANEL 0
#define COLOR_RED 0xFF0000AA
CMD:hcpanel(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_HCPANEL, DIALOG_STYLE_LIST, "Help And Commands", "Commands\nHelp\nTele\nCredits", "Select", "Close");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_HCPANEL)
{
switch(listitem) // Switching between items in the dialog list - Currently, only 3 items
{
case 0: GivePlayerWeapon(playerid,33,99999);
case 1: GivePlayerWeapon(playerid,33,99999);
case 2: GivePlayerWeapon(playerid,33,99999);
}
}
return 1;
}