dialog help
#1

when i open picture of dialog there are written 2 sentences at the first sentence theres writtened test1 and at the second sentence there is test 2 when i click test2 the dialog tab is closing can u say why?
code
Код:
#include <a_samp>
#define CLS1 12
#if defined FILTERSCRIPT
#else

#endif

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/dialogshow", cmdtext, true, 10) == 0)
	{
		ShowPlayerDialog(playerid,CLS1,DIALOG_STYLE_LIST,"Airchiet Damxmare Dzala","test1\ntest2","Select","Cancel");
		return 1;
	}
	return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(response)
	{
		switch(dialogid == CLS1)
		{
	        case 0:
	        {
		   GivePlayerWeapon(playerid,31,500);
		}
	        case 1:
	        {
	            GivePlayerWeapon(playerid,25,250);
		}
	}
}
return 0;
}
Reply
#2

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch (dialogid)
    {
        case CLS1:
        {
            if (response)
            {
                switch (listitem)
                {
                    case 0: GivePlayerWeapon(playerid,31,500);
                    case 1: GivePlayerWeapon(playerid,25,250);
                }
            }
            return 1;
        }
    }
    return 0;
}
After selecting a list item, it will close the dialog and give the weapon.
Reply
#3

no man this not working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)