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
#2

wait a sec
Reply
#3

I got this warnings

Код:
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(27078) : warning 211: possibly unintended assignment
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(27081) : warning 211: possibly unintended assignment
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(27085) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
Reply
#4

fixed try again
Reply
#5

Here

Код:
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");
		}
	    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");
		}
		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;
}
#recognize the bracket properly it should work now
Reply
#6

pawn Код:
CMD:getvipgun(playerid, params[])
{
    if(PlayerInfo[playerid][pGunRes]>0)
        return SendClientMessage(playerid, COLOR_GREY, "You're not allowed to take weapons while having gun restriction!");
       
    if(PlayerInfo[playerid][pDonator] < 1)
         return SendClientMessage(playerid, COLOR_WHITE, "You're not a Premium Donator");

    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;
}
Adjust indentation as the forum has messed it up a bit.
Reply
#7

How about this 2 cmds

Код:
CMD:vipheal(playerid, params[])
{
    if(PlayerInfo[playerid][pDonator] < 1)
	{
         SendClientMessage(playerid, COLOR_WHITE, "You're not a Donator");
         return 1;
    }
    if(IsPlayerInRangeOfPoint(playerid,3,1138.5555, 173.4009, 8999.2773))
    {
        if(PlayerInfo[playerid][pDonator] = 3)
            SetPlayerHealth(playerid, 100);
		if(PlayerInfo[playerid][pDonator] = 2)
		    GivePlayerCash(playerid, -25);
		    SetPlayerHealth(playerid, 100);
		if(PlayerInfo[playerid][pDonator] = 1)
		    GivePlayerCash(playerid, -50);
		    SetPlayerHealth(playerid, 100);
    }
    else
        SendClientMessage(playerid, COLOR_GRAD1, "Your not at VIP Lounge!");

    return 1;
}

CMD:viparmor(playerid, params[])
{
    if(PlayerInfo[playerid][pDonator] < 1)
	{
         SendClientMessage(playerid, COLOR_WHITE, "You're not a Donator");
         return 1;
    }
    if(IsPlayerInRangeOfPoint(playerid,3,1138.5555, 173.4009, 8999.2773))
    {
        if(PlayerInfo[playerid][pDonator] = 3)
            SetPlayerArmourEx(playerid, 100);
        if(PlayerInfo[playerid][pDonator] =2)
		    GivePlayerCash(playerid, -25);
		    SetPlayerArmourEx(playerid, 100);
		if(PlayerInfo[playerid][pDonator] =1)
		    GivePlayerCash(playerid, -50);
		    SetPlayerArmourEx(playerid, 100);
	}
    else
        SendClientMessage(playerid, COLOR_GRAD1, "Your not at VIP Lounge!");

    return 1;
}
I'am getting 6 Warnings in that 2 CMDs here's the warnings

Код:
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(27130) : warning 211: possibly unintended assignment
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(27132) : warning 211: possibly unintended assignment
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(27135) : warning 211: possibly unintended assignment
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(27154) : warning 211: possibly unintended assignment
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(27156) : warning 211: possibly unintended assignment
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(27159) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Warnings.
Reply
#8

Quote:
Originally Posted by ChuckyBabe
Посмотреть сообщение
How about this 2 cmds

Код:
CMD:vipheal(playerid, params[])
{
    if(PlayerInfo[playerid][pDonator] < 1)
	{
         SendClientMessage(playerid, COLOR_WHITE, "You're not a Donator");
         return 1;
    }
    if(IsPlayerInRangeOfPoint(playerid,3,1138.5555, 173.4009, 8999.2773))
    {
        if(PlayerInfo[playerid][pDonator] = 3)
            SetPlayerHealth(playerid, 100);
		if(PlayerInfo[playerid][pDonator] = 2)
		    GivePlayerCash(playerid, -25);
		    SetPlayerHealth(playerid, 100);
		if(PlayerInfo[playerid][pDonator] = 1)
		    GivePlayerCash(playerid, -50);
		    SetPlayerHealth(playerid, 100);
    }
    else
        SendClientMessage(playerid, COLOR_GRAD1, "Your not at VIP Lounge!");

    return 1;
}

CMD:viparmor(playerid, params[])
{
    if(PlayerInfo[playerid][pDonator] < 1)
	{
         SendClientMessage(playerid, COLOR_WHITE, "You're not a Donator");
         return 1;
    }
    if(IsPlayerInRangeOfPoint(playerid,3,1138.5555, 173.4009, 8999.2773))
    {
        if(PlayerInfo[playerid][pDonator] = 3)
            SetPlayerArmourEx(playerid, 100);
        if(PlayerInfo[playerid][pDonator] =2)
		    GivePlayerCash(playerid, -25);
		    SetPlayerArmourEx(playerid, 100);
		if(PlayerInfo[playerid][pDonator] =1)
		    GivePlayerCash(playerid, -50);
		    SetPlayerArmourEx(playerid, 100);
	}
    else
        SendClientMessage(playerid, COLOR_GRAD1, "Your not at VIP Lounge!");

    return 1;
}
I'am getting 6 Warnings in that 2 CMDs here's the warnings

Код:
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(27130) : warning 211: possibly unintended assignment
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(27132) : warning 211: possibly unintended assignment
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(27135) : warning 211: possibly unintended assignment
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(27154) : warning 211: possibly unintended assignment
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(27156) : warning 211: possibly unintended assignment
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(27159) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Warnings.
pawn Код:
CMD:vipheal(playerid, params[])
{
    if(PlayerInfo[playerid][pDonator] < 1)
         return SendClientMessage(playerid, COLOR_WHITE, "You're not a Donator");
         
    if(IsPlayerInRangeOfPoint(playerid, 3, 1138.5555, 173.4009, 8999.2773))
    {
        if(PlayerInfo[playerid][pDonator] == 3)
        {
            SetPlayerHealth(playerid, 100);
        }
        else if(PlayerInfo[playerid][pDonator] == 2)
        {
            GivePlayerCash(playerid, -25);
            SetPlayerHealth(playerid, 100);
           
        }
        else if(PlayerInfo[playerid][pDonator] == 1)
        {
            GivePlayerCash(playerid, -50);
            SetPlayerHealth(playerid, 100);
        }
    }    
else SendClientMessage(playerid, COLOR_GRAD1, "Your not at VIP Lounge!");

    return 1;
}

CMD:viparmor(playerid, params[])
{
    if(PlayerInfo[playerid][pDonator] < 1)
         return SendClientMessage(playerid, COLOR_WHITE, "You're not a Donator");

    if(IsPlayerInRangeOfPoint(playerid, 3, 1138.5555, 173.4009, 8999.2773))
    {
        if(PlayerInfo[playerid][pDonator] == 3)
        {
            SetPlayerArmourEx(playerid, 100);
        }
        else if(PlayerInfo[playerid][pDonator] == 2)
        {
            GivePlayerCash(playerid, -25);
            SetPlayerArmourEx(playerid, 100);
        }
        else if(PlayerInfo[playerid][pDonator] == 1)
        {
            GivePlayerCash(playerid, -50);
            SetPlayerArmourEx(playerid, 100);
        }
    }
    else SendClientMessage(playerid, COLOR_GRAD1, "Your not at VIP Lounge!");
    return 1;
}
Reply
#9

+1 Rep Infamous
Reply
#10

That warning means you've messed up single = and double ==.
In if-statements, to detect if something is equal to something else, use double ==.
To assign a value, use a single =.
Ex:
Quote:
new MyVariable;
MyVariable = 2;
if(MyVariable == 2)

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)