Dialogs help
#1

hey so I have a dialog system that opens in /shop but when I type /shop and choose the rthing I want the dialog doesn't response why?
Reply
#2

Show your code please
Reply
#3

here is the required code
Код:
#define Dialog_Shop 2560
#define Dialog_Weapons 2561
#define Dialog_Vehicles 2562
#define Dialog_Foods 2563
#define Dialog_Accessories 2564
#define Dialog_Hats 2565
#define Dialog_Glasses 2566
#define Dialog_Masks 2567
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_YELLOW "{F3FF02}"
#define COL_LRED "{FFA1A1
#define COLOR_LIGHTRED 0xFF6347AA
#define COLOR_LIGHTBLUE 0x33CCFFAA
enum PAttachedObjectPos
{
	Po_Mod,
	Po_Bond,
	Float:Po_X,
	Float:Po_Y,
	Float:Po_Z,
	Float:Po_RX,
	Float:Po_RY,
	Float:Po_RZ,
	Float:Po_SX,
	Float:Po_SY,
	Float:Po_SZ
}

new PAttached[MAX_PLAYERS][MAX_PLAYER_ATTACHED_OBJECTS][PAttachedObjectPos];
new PCreatedVehicleid[MAX_PLAYERS] = 999;
new bool:PBoughtVehicle[MAX_PLAYERS];
new bool:PGotHat[MAX_PLAYERS];
new bool:PGotGlass[MAX_PLAYERS];
new bool:PGotMask[MAX_PLAYERS];
new LastVehicleid = 17; // Put id of your last car
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == Dialog_Shop)
	{
	    if(!response) return SendClientMessage(playerid,COLOR_YELLOW,"Please Visit Our Online Shop Again");
		switch(listitem)
		{
			case 0:
			{
				ShowPlayerDialog(playerid,Dialog_Weapons,5,"Weapon Shop :","Weapon\tPrice\tAmmo\nDeagle\t$1000\t90\nPump Shotgun\t$1800\t150\nSawnoff\t$2500\t85\nM4\t$3500\t500\nAK-47\t$3000\t500\nMp5\t$2800\t500\nTec-9\t$2400\t500\nSnipe\t$4800\t40\nArmor\t$5000\t1","Buy","Back");
				PlayerPlaySound(playerid,5201,0,0,0);
			} // weapons
			case 1:
			{
				ShowPlayerDialog(playerid,Dialog_Vehicles,5,"Vehicle Shop:","Name\tPrice\nNitro\t2300\nBuggalo\t$19000\nInfernus\t$28000\nCheetah\t$21000\nBanshee\t$20000\nTurismo\t$26000\nMaverik\t$40000\nHorting Racer\t$38000\nNRG-500\t$15000\nKart\t$13000","Buy","Back");
				PlayerPlaySound(playerid,5201,0,0,0);
			} //vehicles
			case 2:
			{
			    ShowPlayerDialog(playerid,Dialog_Foods,5,"Food Menu :","Name:\tPrice:\tHealling\nSalad\t100\t10\nSoda\t150\t15\nPizza\t400\t20\nPasta\t800\t30\nWine\t1800\t60\nWeed\t2200\tFull Health","Buy","Back");
                PlayerPlaySound(playerid,5201,0,0,0);
			} //foods
			case 3:
			{
			    ShowPlayerDialog(playerid,Dialog_Accessories,2,"Accessories List :","Hat's\nGlass'es\nMask's","Select","Back");
                PlayerPlaySound(playerid,5201,0,0,0);
			} //Accessories
		}
	}
	if(dialogid == Dialog_Weapons)
	{
		if(!response) return ShowPlayerDialog(playerid,Dialog_Shop,DIALOG_STYLE_LIST,"Jizzy Online Shop:","Weapon's\nVehicle's\nFoods\nAccessories","Select","Quit");
		switch(listitem)
		{
			case 0:
			{
				if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
				GivePlayerMoney(playerid,-1000);
				GivePlayerWeapon(playerid,24,90);
				PlayerPlaySound(playerid,1052,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Deagle "COL_WHITE"For "COL_RED"$1000");
			}
			case 1:
			{
                if(GetPlayerMoney(playerid) < 1800) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
                GivePlayerMoney(playerid,-1800);
				GivePlayerWeapon(playerid,25,150);
				PlayerPlaySound(playerid,1052,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Shotgun "COL_WHITE"For "COL_RED"$1800");
			}
			case 2:
			{
                if(GetPlayerMoney(playerid) < 2500) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
                GivePlayerMoney(playerid,-2500);
				GivePlayerWeapon(playerid,26,85);
				PlayerPlaySound(playerid,1052,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"SawnOff Shotgun "COL_WHITE"For "COL_RED"$2500");
			}
			case 3:
			{
                if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
                GivePlayerMoney(playerid,-3500);
				GivePlayerWeapon(playerid,31,500);
				PlayerPlaySound(playerid,1052,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"M4 "COL_WHITE"For "COL_RED"$3500");
			}
			case 4:
			{
                if(GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
                GivePlayerMoney(playerid,-3000);
				GivePlayerWeapon(playerid,30,500);
				PlayerPlaySound(playerid,1052,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"AK-47 "COL_WHITE"For "COL_RED"$3000");
			}
			case 5:
			{
                if(GetPlayerMoney(playerid) < 2800) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
                GivePlayerMoney(playerid,-2800);
				GivePlayerWeapon(playerid,29,500);
				PlayerPlaySound(playerid,1052,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Mp5 "COL_WHITE"For "COL_RED"$2800");
			}
			case 6:
			{
                if(GetPlayerMoney(playerid) < 2400) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
                GivePlayerMoney(playerid,-2400);
				GivePlayerWeapon(playerid,32,500);
				PlayerPlaySound(playerid,1052,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Tec-9 "COL_WHITE"For "COL_RED"$2400");
			}
			case 7:
			{
                if(GetPlayerMoney(playerid) < 4800) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
                GivePlayerMoney(playerid,-4800);
				GivePlayerWeapon(playerid,34,40);
				PlayerPlaySound(playerid,1052,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Snipe "COL_WHITE"For "COL_RED"$4800");
			}
			case 8:
			{
                if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
                SetPlayerArmour(playerid,100.0);
                GivePlayerMoney(playerid,-5000);
                PlayerPlaySound(playerid,1052,0,0,0);
                SendClientMessage(playerid,COLOR_LIGHTRED,"Please Try To Wear This Also Every Where To Be Safe");
			}
		}
	}
	if(dialogid == Dialog_Vehicles)
	{
        if(!response) return ShowPlayerDialog(playerid,Dialog_Shop,DIALOG_STYLE_LIST,"Jizzy Online Shop:","Weapon's\nVehicle's\nFoods\nAccessories","Select","Quit");
        switch(listitem)
        {
			case 0:
			{
			    new pvehid;
			    pvehid = GetPlayerVehicleID(playerid);
				if(GetPlayerMoney(playerid) < 2300) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
				GivePlayerMoney(playerid,-2300);
				AddVehicleComponent(pvehid,1010);
				PlayerPlaySound(playerid,39076,0,0,0);
				SendClientMessage(playerid,COLOR_YELLOW,"Try To Not Go So Fast if You Can!");
			}
			case 1:
			{
				if(GetPlayerMoney(playerid) < 19000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
				if(PBoughtVehicle[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Can Not Have 2 Vehicle's Use "COL_YELLOW"<< /Destroyveh >>");

				new Float:X,Float:Y,Float:Z,Float:A;

				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,A);
				GivePlayerMoney(playerid,-19000);
				CreateVehicle(402,X,Y,Z,A,-1,-1,60000);
				PBoughtVehicle[playerid] = true;
				PCreatedVehicleid[playerid] = LastVehicleid;
				LastVehicleid++;
				PlayerPlaySound(playerid,39076,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Buffalo "COL_WHITE"For "COL_RED"$19000");

			}
			case 2:
			{
				if(GetPlayerMoney(playerid) < 28000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
				if(PBoughtVehicle[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Can Not Have 2 Vehicle's Use "COL_YELLOW"<< /Destroyveh >>");
				new Float:X,Float:Y,Float:Z,Float:A;

				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,A);
				GivePlayerMoney(playerid,-28000);
				CreateVehicle(411,X,Y,Z,A,-1,-1,60000);
				PBoughtVehicle[playerid] = true;
				PCreatedVehicleid[playerid] = LastVehicleid;
				LastVehicleid++;
				PlayerPlaySound(playerid,39076,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought An "COL_RED"Infernus "COL_WHITE"For "COL_RED"$28000");
			}
			case 3:
			{
				if(GetPlayerMoney(playerid) < 21000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
				if(PBoughtVehicle[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Can Not Have 2 Vehicle's Use "COL_YELLOW"<< /Destroyveh >>");
				new Float:X,Float:Y,Float:Z,Float:A;

				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,A);
				GivePlayerMoney(playerid,-21000);
				CreateVehicle(415,X,Y,Z,A,-1,-1,60000);
				PBoughtVehicle[playerid] = true;
				PCreatedVehicleid[playerid] = LastVehicleid;
				LastVehicleid++;
				PlayerPlaySound(playerid,39076,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Cheetah "COL_WHITE"For "COL_RED"$21000");
			}
			case 4:
			{
				if(GetPlayerMoney(playerid) < 20000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
				if(PBoughtVehicle[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Can Not Have 2 Vehicle's Use "COL_YELLOW"<< /Destroyveh >>");
				new Float:X,Float:Y,Float:Z,Float:A;

				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,A);
				GivePlayerMoney(playerid,-20000);
				CreateVehicle(429,X,Y,Z,A,-1,-1,60000);
				PBoughtVehicle[playerid] = true;
				PCreatedVehicleid[playerid] = LastVehicleid;
				LastVehicleid++;
				PlayerPlaySound(playerid,39076,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Banshee "COL_WHITE"For "COL_RED"$20000");
			}
			case 5:
			{
				if(GetPlayerMoney(playerid) < 26000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
				if(PBoughtVehicle[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Can Not Have 2 Vehicle's Use "COL_YELLOW"<< /Destroyveh >>");
				new Float:X,Float:Y,Float:Z,Float:A;

				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,A);
				GivePlayerMoney(playerid,-26000);
				CreateVehicle(451,X,Y,Z,A,-1,-1,60000);
				PBoughtVehicle[playerid] = true;
				PCreatedVehicleid[playerid] = LastVehicleid;
				LastVehicleid++;
				PlayerPlaySound(playerid,39076,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Banshee "COL_WHITE"For "COL_RED"$26000");
			}
			case 6:
			{
				if(GetPlayerMoney(playerid) < 40000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
				if(PBoughtVehicle[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Can Not Have 2 Vehicle's Use "COL_YELLOW"<< /Destroyveh >>");
				new Float:X,Float:Y,Float:Z,Float:A;

				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,A);
				GivePlayerMoney(playerid,-40000);
				CreateVehicle(487,X,Y,Z,A,-1,-1,60000);
				PBoughtVehicle[playerid] = true;
				PCreatedVehicleid[playerid] = LastVehicleid;
				LastVehicleid++;
				PlayerPlaySound(playerid,39076,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Maverick "COL_WHITE"For "COL_RED"$40000");
			}
			case 7:
			{
				if(GetPlayerMoney(playerid) < 38000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
				if(PBoughtVehicle[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Can Not Have 2 Vehicle's Use "COL_YELLOW"<< /Destroyveh >>");
				new Float:X,Float:Y,Float:Z,Float:A;

				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,A);
				GivePlayerMoney(playerid,-38000);
				CreateVehicle(494,X,Y,Z,A,-1,-1,60000);
				PBoughtVehicle[playerid] = true;
				PCreatedVehicleid[playerid] = LastVehicleid;
				LastVehicleid++;
				PlayerPlaySound(playerid,39076,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Horting Racer "COL_WHITE"For "COL_RED"$38000");
			}
			case 8:
			{
				if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
				if(PBoughtVehicle[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Can Not Have 2 Vehicle's Use "COL_YELLOW"<< /Destroyveh >>");
				new Float:X,Float:Y,Float:Z,Float:A;

				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,A);
				GivePlayerMoney(playerid,-15000);
				CreateVehicle(522,X,Y,Z,A,-1,-1,60000);
				PBoughtVehicle[playerid] = true;
				PCreatedVehicleid[playerid] = LastVehicleid;
				LastVehicleid++;
				PlayerPlaySound(playerid,39076,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"NRG-500 "COL_WHITE"For "COL_RED"$15000");
			}
			case 9:
			{
				if(GetPlayerMoney(playerid) < 13000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have That Much Money");
				if(PBoughtVehicle[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Can Not Have 2 Vehicle's Use "COL_YELLOW"<< /Destroyveh >>");
				new Float:X,Float:Y,Float:Z,Float:A;

				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,A);
				GivePlayerMoney(playerid,-13000);
				CreateVehicle(571,X,Y,Z,A,-1,-1,60000);
				PBoughtVehicle[playerid] = true;
				PCreatedVehicleid[playerid] = LastVehicleid;
				LastVehicleid++;
				PlayerPlaySound(playerid,39076,0,0,0);
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Kart "COL_WHITE"For "COL_RED"$13000");
			}
		}
	}
	if(dialogid == Dialog_Foods)
	{
        if(!response) return ShowPlayerDialog(playerid,Dialog_Shop,DIALOG_STYLE_LIST,"Jizzy Online Shop:","Weapon's\nVehicle's\nFoods\nAccessories","Select","Quit");
        switch(listitem)
        {
			case 0:
			{
				new Float:HP;
				if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money!");
				GivePlayerMoney(playerid,-100);
				GetPlayerHealth(playerid,HP);
				SetPlayerHealth(playerid,HP+10);
				PlayerPlaySound(playerid,1150,0,0,0);
				ApplyAnimation(playerid,"VENDING","VEND_Eat_P",4.1,0,0,0,0,5000,1);
				SendClientMessage(playerid,COLOR_LIGHTRED,"Please Help Your Self!");
			}
			case 1:
			{
				new Float:HP;
				if(GetPlayerMoney(playerid) < 150) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money!");
				GivePlayerMoney(playerid,-150);
				GetPlayerHealth(playerid,HP);
				SetPlayerHealth(playerid,HP+15);
				PlayerPlaySound(playerid,1150,0,0,0);
				ApplyAnimation(playerid,"VENDING","VEND_Drink_P",4.1,0,0,0,0,5000,1);
				SendClientMessage(playerid,COLOR_LIGHTRED,"Please Help Your Self!");
			}
			case 2:
			{
				new Float:HP;
				if(GetPlayerMoney(playerid) < 400) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money!");
				GivePlayerMoney(playerid,-400);
				GetPlayerHealth(playerid,HP);
				SetPlayerHealth(playerid,HP+20);
				PlayerPlaySound(playerid,1150,0,0,0);
				ApplyAnimation(playerid,"VENDING","VEND_Eat_P",4.1,0,0,0,0,5000,1);
				SendClientMessage(playerid,COLOR_LIGHTRED,"Please Help Your Self!");
			}
			case 3:
			{
				new Float:HP;
				if(GetPlayerMoney(playerid) < 800) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money!");
				GivePlayerMoney(playerid,-800);
				GetPlayerHealth(playerid,HP);
				SetPlayerHealth(playerid,HP+30);
				PlayerPlaySound(playerid,1150,0,0,0);
				ApplyAnimation(playerid,"VENDING","VEND_Eat_P",4.1,0,0,0,0,5000,1);
				SendClientMessage(playerid,COLOR_LIGHTRED,"Please Help Your Self!");
			}
			case 4:
			{
				new Float:HP;
				if(GetPlayerMoney(playerid) < 1800) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money!");
				GivePlayerMoney(playerid,-1800);
				GetPlayerHealth(playerid,HP);
				SetPlayerHealth(playerid,HP+60);
				PlayerPlaySound(playerid,1150,0,0,0);
				ApplyAnimation(playerid,"VENDING","VEND_Drink_P",4.1,0,0,0,0,5000,1);
				SendClientMessage(playerid,COLOR_LIGHTRED,"Please Help Your Self!");
			}
			case 5:
			{
				if(GetPlayerMoney(playerid) < 2200) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money!");
				SetPlayerHealth(playerid,100.0);
				ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.1,0,0,0,0,5000,1);
				SetPlayerDrunkLevel(playerid,1);
			}
		}
	}
	if(dialogid == Dialog_Accessories)
	{
        if(!response) return ShowPlayerDialog(playerid,Dialog_Shop,DIALOG_STYLE_LIST,"Jizzy Online Shop:","Weapon's\nVehicle's\nFoods\nAccessories","Select","Quit");
        switch(listitem)
        {
			case 0:
			{
				ShowPlayerDialog(playerid,Dialog_Hats,5,"Hats List :","Hat Mode\tPrice\n\
				Red Helmet\t$1200\n\
				Blue Helpmet\t$1200\n\
				Army Cap\t$2200\n\
				Red Cap\t$2000\n\
				Blue Cap\t$2000\n\
				Black Hat\t$1200\n\
				Red Hat\t$1200\n\
				Black Cop Cap\t$4800\n\
				Red Cop Cap\t$4800\n\
				Tiger Skin Hat\t$6000","Buy","Back");
				PlayerPlaySound(playerid,5201,0,0,0);
			}
			case 1:
			{
                ShowPlayerDialog(playerid,Dialog_Glasses,5,"Glasses List :","Glass Mode\tPrice\n\
				Normal Red Glass\t$1000\n\
				Normal Yellow Glass\t$1000\n\
				Nice Black Glass\t$2000\n\
				Nice Red Glass\t$2000\n\
				Cop Red Glass\t$3800\n\
				Cop Blue Glass\t$3800","Buy","Back");
                PlayerPlaySound(playerid,5201,0,0,0);
			}
			case 2:
			{
                ShowPlayerDialog(playerid,Dialog_Masks,5,"Masks List :","Mask Mode\tPrice\n\
				Tiger Mask\t$6000\n\
				Skull Mask\t$2000\n\
				Black Gang Mask\t$1200\n\
				Green Gang Mask\t$1200\n\
				Army Mask\t$3200\n\
				Blue Mask\t$2800\n\
				Hokey Mask\t$1400","Buy","Back");
                PlayerPlaySound(playerid,5201,0,0,0);
			}
		}
	}
	if(dialogid == Dialog_Hats)
	{
        if(!response) return ShowPlayerDialog(playerid,Dialog_Accessories,2,"Accessories List :","Hat's\nGlass'es\nMask's","Select","Back");
        switch(listitem)
        {
			case 0:
			{
				if(GetPlayerMoney(playerid) < 1200) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money");
				if(PGotHat[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Got One Hat use "COL_YELLOW"<< /DeletAccess >> ");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-1200);
				SetPlayerAttachedObject(playerid,0,18645,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotHat[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Red Helmet");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Hat By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 1:
			{
				if(GetPlayerMoney(playerid) < 1200) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money");
				if(PGotHat[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Got One Hat use "COL_YELLOW"<< /DeletAccess >> ");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-1200);
				SetPlayerAttachedObject(playerid,0,18646,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotHat[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Blue Helmet");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Hat By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 2:
			{
				if(GetPlayerMoney(playerid) < 2200) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money");
				if(PGotHat[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Got One Hat use "COL_YELLOW"<< /DeletAccess >> ");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-2200);
				SetPlayerAttachedObject(playerid,0,18926,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotHat[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Army Cap");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Hat By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 3:
			{
				if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money");
				if(PGotHat[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Got One Hat use "COL_YELLOW"<< /DeletAccess >> ");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-2000);
				SetPlayerAttachedObject(playerid,0,18930,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotHat[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Red Cap");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Hat By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 4:
			{
				if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money");
				if(PGotHat[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Got One Hat use "COL_YELLOW"<< /DeletAccess >> ");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-2000);
				SetPlayerAttachedObject(playerid,0,18931,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotHat[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Blue Cap");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Hat By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 5:
			{
				if(GetPlayerMoney(playerid) < 1200) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money");
				if(PGotHat[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Got One Hat use "COL_YELLOW"<< /DeletAccess >> ");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-1200);
				SetPlayerAttachedObject(playerid,0,18944,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotHat[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Black Hat");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Hat By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 6:
			{
				if(GetPlayerMoney(playerid) < 1200) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money");
				if(PGotHat[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Got One Hat use "COL_YELLOW"<< /DeletAccess >> ");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-1200);
				SetPlayerAttachedObject(playerid,0,18950,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotHat[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Red Hat");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Hat By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 7:
			{
				if(GetPlayerMoney(playerid) < 4800) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money");
				if(PGotHat[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Got One Hat use "COL_YELLOW"<< /DeletAccess >> ");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-4800);
				SetPlayerAttachedObject(playerid,0,19161,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotHat[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Black Police Cap ");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Hat By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 8:
			{
				if(GetPlayerMoney(playerid) < 4800) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money");
				if(PGotHat[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Got One Hat use "COL_YELLOW"<< /DeletAccess >> ");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-4800);
				SetPlayerAttachedObject(playerid,0,19162,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotHat[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Blue Police Cap ");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Hat By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 9:
			{
				if(GetPlayerMoney(playerid) < 6000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Money");
				if(PGotHat[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Got One Hat use "COL_YELLOW"<< /DeletAccess >> ");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-6000);
				SetPlayerAttachedObject(playerid,0,18970,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotHat[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Tiger Skined Hat");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Hat By Using "COL_YELLOW"<< /EditAccess >>");
			}

		}
	}
	if(dialogid == Dialog_Glasses)
	{
        if(!response) return ShowPlayerDialog(playerid,Dialog_Accessories,2,"Accessories List :","Hat's\nGlass'es\nMask's","Select","Back");
        switch(listitem)
        {
			case 0:
			{
				if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Cash!");
				if(PGotGlass[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Have Glass Use "COL_YELLOW"<< /DeletAccess >>");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-1000);
				SetPlayerAttachedObject(playerid,1,19006,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotGlass[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Normal Red Glass");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Glass By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 1:
			{
                if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Cash!");
				if(PGotGlass[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Have Glass Use "COL_YELLOW"<< /DeletAccess >>");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-1000);
				SetPlayerAttachedObject(playerid,1,19007,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotGlass[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Normal Yellow Glass");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Glass By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 2:
			{
                if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Cash!");
				if(PGotGlass[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Have Glass Use "COL_YELLOW"<< /DeletAccess >>");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-2000);
				SetPlayerAttachedObject(playerid,1,19022,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotGlass[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Nice Black Glass");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Glass By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 3:
			{
                if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Cash!");
				if(PGotGlass[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Have Glass Use "COL_YELLOW"<< /DeletAccess >>");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-2000);
				SetPlayerAttachedObject(playerid,1,19026,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotGlass[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Nice Red Glass");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Glass By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 4:
			{
                if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Cash!");
				if(PGotGlass[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Have Glass Use "COL_YELLOW"<< /DeletAccess >>");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-2000);
				SetPlayerAttachedObject(playerid,1,19028,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotGlass[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Nice Yellow Glass");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Glass By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 5:
			{
                if(GetPlayerMoney(playerid) < 3800) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Cash!");
				if(PGotGlass[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Have Glass Use "COL_YELLOW"<< /DeletAccess >>");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-3800);
				SetPlayerAttachedObject(playerid,1,19139,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotGlass[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Red Cop Glass");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Glass By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 6:
			{
                if(GetPlayerMoney(playerid) < 3800) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Cash!");
				if(PGotGlass[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Have Glass Use "COL_YELLOW"<< /DeletAccess >>");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-3800);
				SetPlayerAttachedObject(playerid,1,19140,2,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotGlass[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Blue Cop Glass");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Glass By Using "COL_YELLOW"<< /EditAccess >>");
			}
		}
	}
	if(dialogid == Dialog_Masks)
	{
        if(!response) return ShowPlayerDialog(playerid,Dialog_Accessories,2,"Accessories List :","Hat's\nGlass'es\nMask's","Select","Back");
        switch(listitem)
        {
			case 0:
			{
                if(GetPlayerMoney(playerid) < 6000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Cash!");
				if(PGotMask[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Have Mask Use "COL_YELLOW"<< /DeleteAccess >>");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-6000);
				SetPlayerAttachedObject(playerid,2,19163,1,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotMask[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Tiger Mask");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Mask By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 1:
			{
				if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Cash!");
				if(PGotMask[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Have Mask Use "COL_YELLOW"<< /DeleteAccess >>");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-2000);
				SetPlayerAttachedObject(playerid,2,18911,1,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotMask[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Skull Mask");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Mask By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 2:
			{
				if(GetPlayerMoney(playerid) < 1200) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Cash!");
				if(PGotMask[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Have Mask Use "COL_YELLOW"<< /DeleteAccess >>");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-1200);
				SetPlayerAttachedObject(playerid,2,11812,1,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotMask[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Black Gang Mask");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Mask By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 3:
			{
				if(GetPlayerMoney(playerid) < 1200) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Cash!");
				if(PGotMask[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Have Mask Use "COL_YELLOW"<< /DeleteAccess >>");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-1200);
				SetPlayerAttachedObject(playerid,2,18913,1,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotMask[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Green Gang Mask ");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Mask By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 4:
			{
				if(GetPlayerMoney(playerid) < 3200) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Cash!");
				if(PGotMask[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Have Mask Use "COL_YELLOW"<< /DeleteAccess >>");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-3200);
				SetPlayerAttachedObject(playerid,2,18914,1,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotMask[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Army Mask");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Mask By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 5:
			{
				if(GetPlayerMoney(playerid) < 2800) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Cash!");
				if(PGotMask[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Have Mask Use "COL_YELLOW"<< /DeleteAccess >>");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-2800);
				SetPlayerAttachedObject(playerid,2,18917,1,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotMask[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Blue Lightning Mask");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Mask By Using "COL_YELLOW"<< /EditAccess >>");
			}
			case 6:
			{
				if(GetPlayerMoney(playerid) < 1400) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Enough Cash!");
				if(PGotMask[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Already Have Mask Use "COL_YELLOW"<< /DeleteAccess >>");
				PlayerPlaySound(playerid,1052,0,0,0);
				GivePlayerMoney(playerid,-1400);
				SetPlayerAttachedObject(playerid,2,19036,1,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0,0);
				PGotMask[playerid] = true;
				SendClientMessage(playerid,COLOR_WHITE,"You Have Bought A "COL_RED"Hokey Mask");
				SendClientMessage(playerid,COLOR_WHITE,"You Can Fit Your Mask By Using "COL_YELLOW"<< /EditAccess >>");
			}
		}
	}
	return 0;
}

public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
{
	if(response)
	{
		SendClientMessage(playerid,COLOR_YELLOW,"Your Accessories Is Ready To Use");
	}
	return 1;
}
CMD:shop(playerid, params[])
{
	ShowPlayerDialog(playerid,Dialog_Shop,DIALOG_STYLE_LIST,"Jizzy Online Shop:","Weapon's\nVehicle's\nFoods\nAccessories","Select","Quit");
 	return 1;
}
Reply
#4

what error show before compile your script, show error log please
Reply
#5

0.0 errors and this is a filterscript at first the dialogs ids where clashed so I randomly changed the dialogs ids to hight number so they don't get clashed.
Reply
#6

any one help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)