Not showing the next dialog
#1

I have issues with the dialog, when I select item nothing happens. The next dialog does not appear, but the first dialog appears, when i select the item does not appear anything

The command:
Код:
CMD:lvpd(playerid, params[])
{
	if(PlayerInfo[playerid][pFacMember] == 14 || PlayerInfo[playerid][pFacLeader] == 14)
	{
		if (IsPlayerInRangeOfPoint(playerid,3,244.131195, 190.252990, 1008.171875))
		{
			ShowPlayerDialog(playerid, LOKERLVPD, DIALOG_STYLE_LIST, "Loker LVPD","Kerja\nPeralatan\nSWAT\nSeragam\nPakaian off duty", "Pilih", "Batal");
		}
		else
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "Kamu tidak sedang berada dekat dengan Locker LVPD.");
		}
	}
	return 1;
}
OnDialogResponse:
Код:
if(dialogid == LOKERLVPD)
	{
 		if(response)
		{
			if(listitem == 0)
			{
				if(PlayerInfo[playerid][pDuty]==0)
				{
					format(string, sizeof(string), "* %s mengambil Badge dan peralatan di Loker.", GetPlayerNameEx(playerid));
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					SetPlayerColor(playerid, COLOR_LVPD);
					SetPlayerArmour(playerid, 100.0);
					GivePlayerValidWeapon(playerid, 24, 99999);
					GivePlayerValidWeapon(playerid, 41, 99999);
					GivePlayerValidWeapon(playerid, 3, 99999);
					OnDuty[playerid] = 1;
					PlayerInfo[playerid][pDuty] = 1;
    			}
				else if(PlayerInfo[playerid][pDuty]==1)
				{
					format(string, sizeof(string), "* %s meletakkan badge dan peralatannya ke Loker.", GetPlayerNameEx(playerid));
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					SetPlayerColor(playerid, TEAM_HIT_COLOR);
					SetPlayerArmour(playerid, 0.0);
					OnDuty[playerid] = 0;
					PlayerInfo[playerid][pDuty] = 0;
				}
			}
			if(listitem == 1)
			{
				ShowPlayerDialog(playerid, LOKERLVPD2, DIALOG_STYLE_LIST, "Peralatan LVPD","Mace\nStick\nDE\nCombat Shotgun\nMP5\nM4A1\nAK-47\nBomb Asap\nShotgun\nRifle\nSniper\nArmor\nK3\nAksesoris", "Ambil", "Batal");
			}
			if(listitem == 2)
			{
			    if(PlayerInfo[playerid][pDivision] == 2)
			    {
					SetPlayerSkin(playerid, 285);
					PlayerInfo[playerid][pModel] = 285;
				}
				else
				{
				    SendClientMessageEx(playerid, COLOR_WHITE, "Kamu bikan divisi SWAT.");
				}
			}
			if(listitem == 3)
			{
				ShowPlayerDialog(playerid, LOKERLVPD3, DIALOG_STYLE_LIST, "Seragam LVPD","Cadet\nPolwan\nSeragam 1\nSeragam 2\nSeragam 3\nBlack Officer\nLatino Officer\nSeragam Bermotor\nSeragam SWAT\nSersan\nKapten\nChief", "Pakai", "Batal");
			}
			if(listitem == 4)
			{
				ShowPlayerDialog(playerid, LOKERLVPD5, DIALOG_STYLE_INPUT, "Penyamaran","Pilih skin (dengan ID).", "Pakai", "Batal");
			}
		}
		return 1;
	}
Reply
#2

pawn Код:
CMD:lvpd(playerid, params[])
{
    if(PlayerInfo[playerid][pFacMember] == 14 || PlayerInfo[playerid][pFacLeader] == 14)
    {
        if(!IsPlayerInRangeOfPoint(playerid,3,244.131195, 190.252990, 1008.171875)) return SendClientMessageEx(playerid, COLOR_WHITE, "Kamu tidak sedang berada dekat dengan Locker LVPD.");
        ShowPlayerDialog(playerid, LOKERLVPD, DIALOG_STYLE_LIST, "Loker LVPD","Kerja\nPeralatan\nSWAT\nSeragam\nPakaian off duty", "Pilih", "Batal");
    }
    return 1;
}
Try it.
Reply
#3

pawn Код:
if(!IsPlayerInRangeOfPoint(playerid, 7.0,244.131195, 190.252990, 1008.171875)) return SendClientMessageEx(playerid, COLOR_WHITE, "Kamu tidak sedang berada dekat dengan Locker LVPD.");
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

u use the wrong format so just change that line alone
Reply
#4

Quote:
Originally Posted by trapstar2020
Посмотреть сообщение
pawn Код:
if(!IsPlayerInRangeOfPoint(playerid, 7.0,244.131195, 190.252990, 1008.171875)) return SendClientMessageEx(playerid, COLOR_WHITE, "Kamu tidak sedang berada dekat dengan Locker LVPD.");
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

u use the wrong format so just change that line alone
I absoultly think that he can do that.
Reply
#5

Quote:
Originally Posted by RedJohn
Посмотреть сообщение
pawn Код:
CMD:lvpd(playerid, params[])
{
    if(PlayerInfo[playerid][pFacMember] == 14 || PlayerInfo[playerid][pFacLeader] == 14)
    {
        if(!IsPlayerInRangeOfPoint(playerid,3,244.131195, 190.252990, 1008.171875)) return SendClientMessageEx(playerid, COLOR_WHITE, "Kamu tidak sedang berada dekat dengan Locker LVPD.");
        ShowPlayerDialog(playerid, LOKERLVPD, DIALOG_STYLE_LIST, "Loker LVPD","Kerja\nPeralatan\nSWAT\nSeragam\nPakaian off duty", "Pilih", "Batal");
    }
    return 1;
}
Try it.
Still not work man, the next dialog still not appear. Please help me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)