Dialog !response don't work
#1

Hi, guys, i have a problem with my dialog whore shop ^^, i post a little script not all ^^

Код:
if(response)
{
	if(listitem == 0)
	{
		if(GetPlayerMoney(playerid) < 17)
		{
			SendClientMessage(playerid,COLOR_RED, "The Dildo cost $17. You haven't enough money!");
			TogglePlayerControllable(playerid, 1);
			return 1;
		}
		GivePlayerMoney(playerid, -17);
      	GivePlayerWeapon(playerid, 10, 1);
		TogglePlayerControllable(playerid, 1);
	}
	if(!response)
	{
		TogglePlayerControllable(playerid, 1);
	}
everything works good, but the !response work not if i do exit in the dialog, it dont unfreeze me, :/
Reply
#2

pawn Код:
if(response)
{
    if(listitem == 0)
    {
        if(GetPlayerMoney(playerid) < 17)
        {
            SendClientMessage(playerid,COLOR_RED, "The Dildo cost $17. You haven't enough money!");
            TogglePlayerControllable(playerid, 1);
            return 1;
        }
        GivePlayerMoney(playerid, -17);
        GivePlayerWeapon(playerid, 10, 1);
        TogglePlayerControllable(playerid, 1);
    }
} else if(!response)
{
    TogglePlayerControllable(playerid, 1);
}
:>
Reply
#3

Quote:
Originally Posted by Dreft
pawn Код:
if(response)
{
    if(listitem == 0)
    {
        if(GetPlayerMoney(playerid) < 17)
        {
            SendClientMessage(playerid,COLOR_RED, "The Dildo cost $17. You haven't enough money!");
            TogglePlayerControllable(playerid, 1);
            return 1;
        }
        GivePlayerMoney(playerid, -17);
        GivePlayerWeapon(playerid, 10, 1);
        TogglePlayerControllable(playerid, 1);
    }
} else if(!response)
{
    TogglePlayerControllable(playerid, 1);
}
:>
thx, sorry im a beginner in dialogs ^^,
Reply
#4

WORK!
Reply
#5

Lol are you blind?

Quote:

if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 17)
{
SendClientMessage(playerid,COLOR_RED, "The Dildo cost $17. You haven't enough money!");
TogglePlayerControllable(playerid, 1);
return 1;
}
GivePlayerMoney(playerid, -17);
GivePlayerWeapon(playerid, 10, 1);
TogglePlayerControllable(playerid, 1);
}
if(!response)
{
TogglePlayerControllable(playerid, 1);
}


Код:
if(response)
{
	if(!response)
	{
That would not work, lol.
Response can never be 0 if it already is 1.
Reply
#6

Quote:
Originally Posted by WackoX
Lol are you blind?

Quote:

if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 17)
{
SendClientMessage(playerid,COLOR_RED, "The Dildo cost $17. You haven't enough money!");
TogglePlayerControllable(playerid, 1);
return 1;
}
GivePlayerMoney(playerid, -17);
GivePlayerWeapon(playerid, 10, 1);
TogglePlayerControllable(playerid, 1);
}
if(!response)
{
TogglePlayerControllable(playerid, 1);
}


Код:
if(response)
{
	if(!response)
	{
That would not work, lol.
Response can never be 0 if it already is 1.
Wat poep jij nou weer :/
tis al fixed ^^, was ff iets vergete
add me weer op xfire btw ^^
Reply
#7

Quote:
Originally Posted by Silox
Quote:
Originally Posted by WackoX
Lol are you blind?

Quote:

if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 17)
{
SendClientMessage(playerid,COLOR_RED, "The Dildo cost $17. You haven't enough money!");
TogglePlayerControllable(playerid, 1);
return 1;
}
GivePlayerMoney(playerid, -17);
GivePlayerWeapon(playerid, 10, 1);
TogglePlayerControllable(playerid, 1);
}
if(!response)
{
TogglePlayerControllable(playerid, 1);
}


Код:
if(response)
{
	if(!response)
	{
That would not work, lol.
Response can never be 0 if it already is 1.
Wat poep jij nou weer :/
tis al fixed ^^, was ff iets vergete
add me weer op xfire btw ^^
Nee, omdat ik geen zin heb om weer 24/7 dit soort problemen voor jou moet oplossen anders ga je me onderspammen.
Next time talk English.
Reply
#8

this time not ^^ i swear
Reply
#9

Hi, i have a question?

pawn Код:
if(strcmp(cmd, "/buyfood", true) == 0)
{
    if(IsPlayerInRangeOfPoint(playerid, 4, -22.1709,-138.4660,1003.5469) || IsPlayerInRangeOfPoint(playerid, 4, 379.1356,-186.7193,1000.6328))
    {
        TogglePlayerControllable(playerid, 0);
        ShowPlayerDialog(playerid, 9, DIALOG_STYLE_LIST, "Food", "Broodje Bapau\nDonuts\nCoca Cola\nFrites\nBanana\nIcecream", "Select", "Cancel");
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "You cannot do this command because you are not at a 24/7.");
    }
    return 1;
}
if i see the dialog list of my food

pawn Код:
ShowPlayerDialog(playerid, 9, DIALOG_STYLE_LIST, "Food", "Broodje Bapau\nDonuts\nCoca Cola\nFrites\nBanana\nIcecream", "Select", "Cancel");
if i cancel it? im freezed :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)