Dialog Help! +1 Rep!
#1

Hello this is my code

Код:
CMD:getvipgun(playerid, params[])
{
	if (PlayerInfo[playerid][pGunRes]>0)
	{
	    SendClientMessage(playerid, COLOR_GREY, "You're not allowed to take weapons while having gun restriction!");
	    return 1;
	}
    if(PlayerInfo[playerid][pDonator] < 1)
	{
         SendClientMessage(playerid, COLOR_WHITE, "You're not a Premium Donator");
         return 1;
    }
    if(IsPlayerInRangeOfPoint(playerid,3,1139.2238, 175.3508, 8999.2764))
    {
        if(PlayerInfo[playerid][pDonator] >= 3)
            ShowPlayerDialogEx(playerid, DIALOG_VIP, DIALOG_STYLE_LIST, "VIP Guns", "Deagle\nSniper Rifle\nShotgun\nSpas-12\nSword\nUzi\nMP5\nTec-9\nAK-47\nM4-A1\nBaseball Bat\nGolf Club\nSawn-Off            (10 VIPTokens)", "OK", "Cancel");
    }
    else if(PlayerInfo[playerid][pDonator] >=2)
	{
			ShowPlayerDialogEx(playerid, DIALOG_VIPS, DIALOG_STYLE_LIST, "VIP Guns", "Deagle        $500\nSniper Rifle      $1500\nSpas-12\nSword       $100\nUzi       $200\nMp5\nTec-9        $300\nAK-47\nM4-A1\nBaseball Bat\nGolf Club\nSawn-Off       (20 VIPTokens)", "OK", "Cancel");
	}
	else if(PlayerInfo[playerid][pDonator] >=1)
	{
			ShowPlayerDialogEx(playerid, DIALOG_VIPP, DIALOG_STYLE_LIST, "VIP Guns", "Deagle        $1000\nSniper Rifle		$3000\nSpas-12      $1000\nSword        $200\nUzi       $400\nMp5       $300\nTec-9     $600\nAk-47     $700\nM4-A1     $700\nBaseball Bat      $100\nGolf Club     $100\nSawn-Off (30 VIPTokens)", "OK", "Cancel");
	}
	else
        SendClientMessage(playerid, COLOR_GRAD1, "You're not in the VIP Lounge!");

    return 1;
}
I set myself to a Premium Donator level 1 VIP , but everytime i type /getvipgun the dialog of Premium Donator doesn't show, and i set myself to Level 2 Vip , and then the Silver Donator dialog doesn't show, but i set my self to level 3 VIP the getvipgun show, but everytime i choose a weapon it decreasing my money that is for Silver And Premium Donator only, the gold donator is must free in the /getvipgun ! help +1 Rep!

This is my dialog id

Код:
if(dialogid == DIALOG_VIP)
	{
		if(response)
        {
			if(listitem == 0)
			{
                GivePlayerValidWeapon(playerid, 24, 99999);
            }
            if(listitem == 1)
            {
                GivePlayerValidWeapon(playerid, 34, 99999);
            }
            if(listitem == 2)
            {
                GivePlayerValidWeapon(playerid, 25, 99999);
            }
            if(listitem == 3)
            {
                GivePlayerValidWeapon(playerid, 27, 99999);
            }
            if(listitem == 4)
            {
                GivePlayerValidWeapon(playerid, 8, 99999);
			}
			if(listitem == 5)
			{
                GivePlayerValidWeapon(playerid, 28, 99999);
            }
            if(listitem == 6)
            {
                GivePlayerValidWeapon(playerid, 29, 99999);
            }
            if(listitem == 7)
            {
                GivePlayerValidWeapon(playerid, 32, 99999);
            }
            if(listitem == 8)
            {
                GivePlayerValidWeapon(playerid, 30, 99999);
            }
            if(listitem == 9)
            {
                GivePlayerValidWeapon(playerid, 31, 99999);
            }
            if(listitem == 10)
            {
                GivePlayerValidWeapon(playerid, 5, 99999);
            }
            if(listitem == 11)
            {
                GivePlayerValidWeapon(playerid, 2, 99999);
            }
            if(listitem == 12)
            {
                if(PlayerInfo[playerid][pVIPToken] < 10) return SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You do not have any tokens! You get tokens every paycheck.");
		        PlayerInfo[playerid][pVIPToken] -= 10;
			    format(string, sizeof(string), "VIP: You have traded 10 tokens for a Sawn-Off, you now have %d token(s).", PlayerInfo[playerid][pVIPToken]);
		        SendClientMessageEx(playerid, COLOR_YELLOW, string);
                GivePlayerValidWeapon(playerid, 26, 99999);
            }
            if(listitem == 13)
            {
                GivePlayerValidWeapon(playerid, 1, 99999);
            }
            if(listitem == 14)
			{
				GivePlayerValidWeapon(playerid, 8, 99999);
			}
			if(listitem == 15)
			{
				GivePlayerValidWeapon(playerid, 5, 99999);
			}
		}
	}
	 if(dialogid == DIALOG_VIPS)
	{
		if(response)
        {
			if(listitem == 0)
			{
                if(GetPlayerCash(playerid) >= 500)
                {
                GivePlayerCash(playerid, -500);
				GivePlayerValidWeapon(playerid, 24, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
            if(listitem == 1)
            {
                if(GetPlayerCash(playerid) >= 1500)
                {
                GivePlayerCash(playerid, -1500);
				GivePlayerValidWeapon(playerid, 34, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
            if(listitem == 2)
            {
                GivePlayerValidWeapon(playerid, 25, 99999);
            }
            if(listitem == 3)
            {
                if(GetPlayerCash(playerid) >= 100)
                {
                GivePlayerCash(playerid, -100);
				GivePlayerValidWeapon(playerid, 27, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
            if(listitem == 4)
            {
                if(GetPlayerCash(playerid) >= 200)
                {
                GivePlayerCash(playerid, -200);
				GivePlayerValidWeapon(playerid, 8, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
			if(listitem == 5)
			{
                GivePlayerValidWeapon(playerid, 28, 99999);
            }
            if(listitem == 6)
            {
                if(GetPlayerCash(playerid) >= 300)
                {
                GivePlayerCash(playerid, -300);
				GivePlayerValidWeapon(playerid, 29, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
            if(listitem == 7)
            {
                GivePlayerValidWeapon(playerid, 32, 99999);
            }
            if(listitem == 8)
            {
                GivePlayerValidWeapon(playerid, 30, 99999);
            }
            if(listitem == 9)
            {
                GivePlayerValidWeapon(playerid, 31, 99999);
            }
            if(listitem == 10)
            {
                GivePlayerValidWeapon(playerid, 5, 99999);
            }
            if(listitem == 11)
            {
                GivePlayerValidWeapon(playerid, 2, 99999);
            }
            if(listitem == 12)
            {
                if(PlayerInfo[playerid][pVIPToken] < 20) return SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You do not have any tokens! You get tokens every paycheck.");
		        PlayerInfo[playerid][pVIPToken] -= 20;
			    format(string, sizeof(string), "VIP: You have traded 10 tokens for a Sawn-Off, you now have %d token(s).", PlayerInfo[playerid][pVIPToken]);
		        SendClientMessageEx(playerid, COLOR_YELLOW, string);
                GivePlayerValidWeapon(playerid, 26, 99999);
            }
            if(listitem == 13)
            {
                GivePlayerValidWeapon(playerid, 1, 99999);
            }
            if(listitem == 14)
			{
				if(GetPlayerCash(playerid) >= 200)
                {
                GivePlayerCash(playerid, -200);
				GivePlayerValidWeapon(playerid, 8, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
			if(listitem == 15)
			{
				GivePlayerValidWeapon(playerid, 5, 99999);
			}
		}
	}
	if(dialogid == DIALOG_VIPP)
	{
		if(response)
        {
			if(listitem == 0)
			{
                if(GetPlayerCash(playerid) >= 1000)
                {
                GivePlayerCash(playerid, -1000);
				GivePlayerValidWeapon(playerid, 24, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
            if(listitem == 1)
            {
                if(GetPlayerCash(playerid) >= 3000)
                {
                GivePlayerCash(playerid, -3000);
				GivePlayerValidWeapon(playerid, 34, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
            if(listitem == 2)
            {
                if(GetPlayerCash(playerid) >= 1000)
                {
                GivePlayerCash(playerid, -1000);
				GivePlayerValidWeapon(playerid, 25, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
            if(listitem == 3)
            {
                if(GetPlayerCash(playerid) >= 200)
                {
                GivePlayerCash(playerid, -200);
				GivePlayerValidWeapon(playerid, 27, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
            if(listitem == 4)
            {
                if(GetPlayerCash(playerid) >= 400)
                {
                GivePlayerCash(playerid, -400);
				GivePlayerValidWeapon(playerid, 8, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
			if(listitem == 5)
			{
                if(GetPlayerCash(playerid) >= 300)
                {
                GivePlayerCash(playerid, -300);
				GivePlayerValidWeapon(playerid, 28, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
            if(listitem == 6)
            {
                if(GetPlayerCash(playerid) >= 600)
                {
                GivePlayerCash(playerid, -600);
				GivePlayerValidWeapon(playerid, 29, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
            if(listitem == 7)
            {
                if(GetPlayerCash(playerid) >= 700)
                {
                GivePlayerCash(playerid, -700);
				GivePlayerValidWeapon(playerid, 32, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
            if(listitem == 8)
            {
                if(GetPlayerCash(playerid) >= 700)
                {
                GivePlayerCash(playerid, -700);
				GivePlayerValidWeapon(playerid, 30, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
            if(listitem == 9)
            {
                if(GetPlayerCash(playerid) >= 100)
                {
                GivePlayerCash(playerid, -100);
				GivePlayerValidWeapon(playerid, 31, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
            if(listitem == 10)
            {
                if(GetPlayerCash(playerid) >= 100)
                {
                GivePlayerCash(playerid, -100);
				GivePlayerValidWeapon(playerid, 5, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
            if(listitem == 11)
            {
                if(GetPlayerCash(playerid) >= 100)
                {
                GivePlayerCash(playerid, -100);
				GivePlayerValidWeapon(playerid, 2, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
            if(listitem == 12)
            {
                if(PlayerInfo[playerid][pVIPToken] < 30) return SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You do not have any tokens! You get tokens every paycheck.");
		        PlayerInfo[playerid][pVIPToken] -= 30;
			    format(string, sizeof(string), "VIP: You have traded 10 tokens for a Sawn-Off, you now have %d token(s).", PlayerInfo[playerid][pVIPToken]);
		        SendClientMessageEx(playerid, COLOR_YELLOW, string);
                GivePlayerValidWeapon(playerid, 26, 99999);
            }
            if(listitem == 13)
            {
                GivePlayerValidWeapon(playerid, 1, 99999);
            }
            if(listitem == 14)
			{
				if(GetPlayerCash(playerid) >= 700)
                {
                GivePlayerCash(playerid, -700);
				GivePlayerValidWeapon(playerid, 8, 99999);
				}
				else
				{
				SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for this weapon!");
				}
            }
			if(listitem == 15)
			{
				GivePlayerValidWeapon(playerid, 5, 99999);
			}
		}
	}
Reply


Messages In This Thread
Dialog Help! +1 Rep! - by ChuckyBabe - 01.04.2015, 03:19
Re: Dialog Help! +1 Rep! - by SequenceCuz - 01.04.2015, 03:38
Re: Dialog Help! +1 Rep! - by ChuckyBabe - 01.04.2015, 03:43
Re: Dialog Help! +1 Rep! - by SequenceCuz - 01.04.2015, 03:45
Re: Dialog Help! +1 Rep! - by SequenceCuz - 01.04.2015, 03:48
Re: Dialog Help! +1 Rep! - by Infamous - 01.04.2015, 03:49
Re: Dialog Help! +1 Rep! - by ChuckyBabe - 01.04.2015, 03:52
Re: Dialog Help! +1 Rep! - by Infamous - 01.04.2015, 03:55
Re: Dialog Help! +1 Rep! - by ChuckyBabe - 01.04.2015, 03:57
Re: Dialog Help! +1 Rep! - by CalvinC - 01.04.2015, 08:43

Forum Jump:


Users browsing this thread: 3 Guest(s)