SA-MP Forums Archive
DIALOG doesnt work ! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: DIALOG doesnt work ! (/showthread.php?tid=443301)



DIALOG doesnt work ! - yaron0600 - 11.06.2013

WHY That problem doesnt work !?



Код:
CMD:boston(playerid, params[])
{
    if(PlayerInfo[playerid][pFMember] == 1)
 	{
  		if(IsPlayerInRangeOfPoint(playerid, 0, 1025.156494, -315.600585, 73.988876))
    	{
     		ShowPlayerDialog(playerid, 2815, DIALOG_STYLE_LIST, "El Bostons Lockers", "Duty\nClothes", "Select", "Cancel");
        }
      	else
		{
  			SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your El Bostons lockers.");
 		}
  	}
	return 1;
}
Dialog :

Код:
	if(dialogid == DIALOG_BOSTONS)
	{
     	switch(listitem)
       	{
        case 0://Duty
			{
				GivePlayerValidWeapon(playerid, 24, 60000);
				GivePlayerValidWeapon(playerid, 29, 60000);
				GivePlayerValidWeapon(playerid, 31, 60000);
			    GivePlayerValidWeapon(playerid, 30, 60000);
				GivePlayerValidWeapon(playerid, 25, 60000);
				GivePlayerValidWeapon(playerid, 33, 60000);
				SetPlayerHealth(playerid, 100.0);
				SetPlayerArmour(playerid, 100.0);
			}
			case 1://Clothes
	        {
		    ShowPlayerDialog( playerid, 3495, DIALOG_STYLE_INPUT, "Skin Selection","Please enter a Skin ID!\n\nNote: Skin Changes cost $2500.", "Buy", "Cancel" );
	        }
		}
	}



Re: DIALOG doesnt work ! - PT - 11.06.2013

Hi

Try this

pawn Код:
CMD:boston(playerid)
{
    if(PlayerInfo[playerid][pFMember] == 1)
    {
        if(IsPlayerInRangeOfPoint(playerid, 0, 1025.156494, -315.600585, 73.988876))
        {
            ShowPlayerDialog(playerid, DIALOG_BOSTONS, DIALOG_STYLE_LIST, "El Bostons Lockers", "Duty\nClothes", "Select", "Cancel");
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, "You aren't in range of your El Bostons lockers.");
        }
    }
    return 1;
}

// OnDialogResponse

if(dialogid == DIALOG_BOSTONS)
{
    if(response)
    {
        if(listitem == 0)
        {
            GivePlayerValidWeapon(playerid, 24, 60000);
            GivePlayerValidWeapon(playerid, 29, 60000);
            GivePlayerValidWeapon(playerid, 31, 60000);
            GivePlayerValidWeapon(playerid, 30, 60000);
            GivePlayerValidWeapon(playerid, 25, 60000);
            GivePlayerValidWeapon(playerid, 33, 60000);
            SetPlayerHealth(playerid, 100.0);
            SetPlayerArmour(playerid, 100.0);
        }
        if(listitem == 1)
        {
            ShowPlayerDialog( playerid, 3495, DIALOG_STYLE_INPUT, "Skin Selection","Please enter a Skin ID!\n\nNote: Skin Changes cost $2500.", "Buy", "Cancel" );
        }    
    }
    return 1;
}



Re: DIALOG doesnt work ! - yaron0600 - 11.06.2013

Doesnt work ty anyway...


Re: DIALOG doesnt work ! - Giannidw - 11.06.2013

Replace DIALOG_BOSTONS for 2815


Re: DIALOG doesnt work ! - RALL0 - 11.06.2013

What doesn't work, the dialog doesn't show or the player wont go on duty?


Re: DIALOG doesnt work ! - yaron0600 - 11.06.2013

I do the /boston and nothing happanes and theres no any message...


Re: DIALOG doesnt work ! - RALL0 - 11.06.2013

Код:
CMD:boston(playerid, params[])
{
    if(PlayerInfo[playerid][pFMember] == 1)
 	{
  		if(IsPlayerInRangeOfPoint(playerid, 0, 1025.156494, -315.600585, 73.988876))
    	{
     		ShowPlayerDialog(playerid, 2815, DIALOG_STYLE_LIST, "El Bostons Lockers", "Duty\nClothes", "Select", "Cancel");
        }
      	else
		{
  			SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your El Bostons lockers.");
 		}
  	}
	return 1;
}

	if(dialogid == 2815)
	{
     	switch(listitem)
       	{
        case 0://Duty
			{
				GivePlayerValidWeapon(playerid, 24, 60000);
				GivePlayerValidWeapon(playerid, 29, 60000);
				GivePlayerValidWeapon(playerid, 31, 60000);
			    GivePlayerValidWeapon(playerid, 30, 60000);
				GivePlayerValidWeapon(playerid, 25, 60000);
				GivePlayerValidWeapon(playerid, 33, 60000);
				SetPlayerHealth(playerid, 100.0);
				SetPlayerArmour(playerid, 100.0);
			}
			case 1://Clothes
	        {
		    ShowPlayerDialog( playerid, 3495, DIALOG_STYLE_INPUT, "Skin Selection","Please enter a Skin ID!\n\nNote: Skin Changes cost $2500.", "Buy", "Cancel" );
	        }
		}
	}
This should work.


Re: DIALOG doesnt work ! - BossZk - 12.06.2013

maybe try changing your range, as you put it at 0 range

this:

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 0, 1025.156494, -315.600585, 73.988876))
to this:

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 5, 1025.156494, -315.600585, 73.988876))