Jump to content
  • 0

kick cand dau cancel la dialog


Papana

Question

Deci am facut o comanda de arme pe dialog

dar vreau cand dau cancel sa nu-mi dea kick

doar sa iasa din dialog.

comanda

if (strcmp("/buygun", cmdtext, true, 10) == 0)
	{
        if(IsPlayerConnected(playerid))
	    {
		    if(GetPlayerCash(playerid) < 1)
		    {
		    	SendClientMessage(playerid, COLOR_GREY, "   You dont have enough money with you !");
		    	return 1;
		    }
		    new location = PlayerInfo[playerid][pLocal];
		    if(location == 99 || location == 100 || location == 102)
		    {
				ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
			}
			else
			{
			SendClientMessage(playerid, COLOR_WHITE,"You are not in a store.");
			return 1;
			}
		}
        return 1;
	}
dialogu
if(dialogid == DIALOGAR) //
	{
		if(response)
		{
   			if(listitem == 0) // 
			{
				ShowPlayerDialog(playerid, DIALOGAR+1, DIALOG_STYLE_LIST, "Pistoale Automate", "Micro SMG [$3000] \nSMG [$3500] \nAK47 [$3500] \nM4 [$3500] \nTec9 [$8500] \nBack", "Select", "Cancel");
			}
			if(listitem == 1) // 
			{
				ShowPlayerDialog(playerid, DIALOGAR+2, DIALOG_STYLE_LIST, "Pistoale", "9mm [$1500] \nSilenced 9mm [$1500] \nDeagle [$1500] \nBack", "Select", "Cancel");
			}
			if(listitem == 2) // 
			{
				ShowPlayerDialog(playerid, DIALOGAR+3, DIALOG_STYLE_LIST, " Arme cu Lunete", "Country Rifle [$3100] \nSniper Rifle [$6100] \nBack", "Select", "Cancel");
   			}
   			if(listitem == 3) // 
			{
				ShowPlayerDialog(playerid, DIALOGAR+4, DIALOG_STYLE_LIST, "Shotgun", "Shotgun [$2100] \nSawnoff Shotgun [$3100] \nCombat Shotgun [$2100] \nBack", "Select", "Cancel");
   			}
   			if(listitem == 4) // 
			{
				ShowPlayerDialog(playerid, DIALOGAR+5, DIALOG_STYLE_LIST, "Special", "Camera [$990] \nNightvision Goggles [$990] \nInfared Vision [$990] \nParachute [$990] \nBack", "Select", "Cancel");
   			}
   			if(listitem == 5) // 
			{
				ShowPlayerDialog(playerid, DIALOGAR+6, DIALOG_STYLE_LIST, "Arme Manuale", "Spraycan [$850] \nFire Extinguisher [$850] \nBack", "Select", "Cancel");
   			}
   			if(listitem == 6) // 
			{
				ShowPlayerDialog(playerid, DIALOGAR+7, DIALOG_STYLE_LIST, "Melee","Brass Knuckles [$550] \nGolf Club [$550] \nNite Stick [$550] \nKnife [$550] \nBaseball Bat [$550] \nShovel [$550] \nPool Cue [$550] \nKatana [$550] \nChainsaw [$550] \nPurple Dildo [$550] \nSmall White Vibrator [$550] \nLarge White Vibrator [$550] \nSilver Vibrator [$550] \nFlowers [$550] \nCane [$550] \nBack", "Select", "Cancel");
   			}
		}
		return 1;
	}

	if(dialogid == DIALOGAR+1) //
	{
		if(response)
		{
			if(listitem == 0) // Micro-SMG
			{
				GivePlayerWeapon(playerid,28, 300);
				GivePlayerCash(playerid, -3000);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Micro-SMG.");
			}
			if(listitem == 1) //SMG
			{
				GivePlayerWeapon(playerid,29, 300);
				GivePlayerCash(playerid, -3500);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat SMG.");
			}
			if(listitem == 2) // AK47
			{
				GivePlayerWeapon(playerid,30, 300);
				GivePlayerCash(playerid, -3500);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat AK47.");
			}
			if(listitem == 3) // M4
			{
				GivePlayerWeapon(playerid,31, 300);
				GivePlayerCash(playerid, -3500);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat M4.");
			}
			if(listitem == 4) // Tec9
			{
				GivePlayerWeapon(playerid,32, 300);
				GivePlayerCash(playerid, -8500);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Tec9.");
			}
			if(listitem == 5) // Back
  			{
                ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
			}
		}
		return 1;
	}

	if(dialogid == DIALOGAR+2) //
	{
		if(response)
		{
			if(listitem == 0) // 9mm
			{
				GivePlayerWeapon(playerid,22, 300);
				GivePlayerCash(playerid, -1500);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Deagle 9mm.");
			}
			if(listitem == 1) // Silenced 9mm
			{
				GivePlayerWeapon(playerid,23, 300);
				GivePlayerCash(playerid, -1500);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Deagle Silenced 9mm.");
			}
			if(listitem == 2) // Deagle
			{
				GivePlayerWeapon(playerid,24, 300);
				GivePlayerCash(playerid, -1500);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Deagle.");
			}
			if(listitem == 3) // Back
			{
                ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
			}
		}
		return 1;
	}

	if(dialogid == DIALOGAR+3) // Rifles
	{
		if(response)
		{
			if(listitem == 0) // Country Rifle
			{
				GivePlayerWeapon(playerid,33, 300);
				GivePlayerCash(playerid, -3100);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Country Rifle.");
			}
			if(listitem == 1) // Sniper Rifle
			{
				GivePlayerWeapon(playerid,34, 300);
				GivePlayerCash(playerid, -6100);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Sniper Rifle.");
			}
			if(listitem == 2) // Back
			{
                ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
			}
		}
		return 1;
	}
	if(dialogid == DIALOGAR+4) // Shotguns
	{
		if(response)
		{
			if(listitem == 0) // Shotgun
			{
				GivePlayerWeapon(playerid,25, 300);
				GivePlayerCash(playerid, -2100);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Shotgun.");
			}
			if(listitem == 1) // Sawnoff Shotgun
			{
				GivePlayerWeapon(playerid,26, 300);
				GivePlayerCash(playerid, -3100);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Sawnoff Shotgun.");
			}
			if(listitem == 2) // Combat Shotgun
			{
				GivePlayerWeapon(playerid,27, 300);
				GivePlayerCash(playerid, -2100);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Combat Shotgun.");
			}
			if(listitem == 3) // Back
			{
                ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
			}
		}
		return 1;
	}
	if(dialogid == DIALOGAR+5) // Special
	{
		if(response)
		{
			if(listitem == 0) // Camera
			{
				GivePlayerWeapon(playerid,43, 300);
				GivePlayerCash(playerid, -990);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Camera.");
			}
			if(listitem == 1) // Nightvision Goggles
			{
				GivePlayerWeapon(playerid,44, 300);
				GivePlayerCash(playerid, -990);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Nightvision Goggles.");
			}
			if(listitem == 2) // Infared Vision
			{
				GivePlayerWeapon(playerid,45, 300);
				GivePlayerCash(playerid, -990);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Infared Vision.");
			}
			if(listitem == 3) // Parachute
			{
				GivePlayerWeapon(playerid,46, 300);
				GivePlayerCash(playerid, -990);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Parachute.");
			}
			if(listitem == 4) // Back
			{
                ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
			}
		}
		return 1;
	}
	if(dialogid == DIALOGAR+6) // Hand Held
	{
		if(response)
		{
			if(listitem == 0) // Spraycan
			{
				GivePlayerWeapon(playerid,41, 300);
				GivePlayerCash(playerid, -850);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Spraycan.");
			}
			if(listitem == 1) // Fire Extinguisher
			{
				GivePlayerWeapon(playerid,42, 300);
				GivePlayerCash(playerid, -850);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Fiera Extinguisher.");
			}
			if(listitem == 2) // Back
			{
                ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
			}
		}
		return 1;
	}
	if(dialogid == DIALOGAR+7) // Melee
	{
		if(response)
		{
			if(listitem == 0) // Brass Knuckles
			{
				GivePlayerWeapon(playerid,1, 300);
				GivePlayerCash(playerid, -550);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Brass Knuckles.");
			}
			if(listitem == 1) // Golf Club
			{
				GivePlayerWeapon(playerid,2, 300);
				GivePlayerCash(playerid, -550);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Golf Club.");
			}
			if(listitem == 2) // Nite Stick
			{
				GivePlayerWeapon(playerid,3, 300);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Nite Stick.");
			}
			if(listitem == 3) // Knife
			{
				GivePlayerWeapon(playerid,4, 300);
				GivePlayerCash(playerid, -550);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Knife.");
			}
			if(listitem == 4) // Baseball Bat
			{
			    GivePlayerWeapon(playerid,5, 300);
			    GivePlayerCash(playerid, -550);
			    SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Baseball Bat");
			}
			if(listitem == 5) // Shovel
			{
				GivePlayerWeapon(playerid,6, 300);
				GivePlayerCash(playerid, -550);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Shovel");
			}
			if(listitem == 6) // Pool Cue
			{
				GivePlayerWeapon(playerid,7, 300);
				GivePlayerCash(playerid, -550);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Pool Cue");
			}
			if(listitem == 7) // Katana
			{
				GivePlayerWeapon(playerid,8, 300);
				GivePlayerCash(playerid, -550);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Katana");
			}
			if(listitem == 8) // Chainsaw
			{
				GivePlayerWeapon(playerid,9, 300);
				GivePlayerCash(playerid, -550);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Chainsaw");
			}
			if(listitem == 9) // Purple Dildo
			{
				GivePlayerWeapon(playerid,10, 300);
				GivePlayerCash(playerid, -550);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Purple Dildo");
			}
			if(listitem == 10) // Small White Vibrator
			{
				GivePlayerWeapon(playerid,11, 300);
				GivePlayerCash(playerid, -550);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Small White Vibrator");
			}
			if(listitem == 11) // Large White Vibrator
			{
			    GivePlayerWeapon(playerid,12, 300);
			    GivePlayerCash(playerid, -550);
			    SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Large White Vibrator");
			}
			if(listitem == 12) // Silver Vibrator
			{
				GivePlayerWeapon(playerid,13, 300);
				GivePlayerCash(playerid, -550);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Silver Vibrator");
			}
			if(listitem == 13) // Flowers
			{
				GivePlayerWeapon(playerid,14, 300);
				GivePlayerCash(playerid, -550);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Flowers");
			}
			if(listitem == 14) // Cane
			{
				GivePlayerWeapon(playerid,15, 300);
				GivePlayerCash(playerid, -550);
				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Cane");
			}
			if(listitem == 15) // Back
			{
                ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
			}
		}
		return 1;
	}

deci ma puteti ajuta

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.