Big GameMode Problem
#8

Well, the command will not work, but i have a few better commands for this:
Код:
//==============================================================================
// Comanda /buyflying
//==============================================================================
	if(strcmp(cmd, "/buyflying", true) == 0)
	{
		if(IsPlayerConnected(playerid))
       	{
			if(PlayerToPoint(3.0,playerid,1412.0840,-1701.5978,13.5395) || PlayerToPoint(3.0,playerid, -2026.543090,-101.443748,35.164062) || PlayerToPoint(3.0,playerid, 1867.345214,1443.582519,10.820312))
          	{
            	if(PlayerInfo[playerid][pFlyLic] == 0)
				{
				    if(GetPlayerCash(playerid) < 10000)
				    {
             		    SendClientMessage(playerid, COLOR_GREY, "Nu ai bani destui for a flying license");
             		    return 1;
             		}
             		else
             		{
             			SendClientMessage(playerid, COLOR_LIGHTBLUE, "You bought a flying license for $10,000");
             			GivePlayerCash(playerid, - 10000);
             			PlayerInfo[playerid][pFlyLic] = 1;
             			OnPlayerUpdateEx(playerid);
             		}
				}
				else
				{
					SendClientMessage(playerid, COLOR_LIGHTBLUE, " You already own a flying license");
					return 1;
				}
			}
		}
  		return 1;
	}
//==============================================================================
// Comanda /buysailing
//==============================================================================
    if(strcmp(cmd, "/buysailing", true) == 0)
	{
		if(IsPlayerConnected(playerid))
       	{
			if(PlayerToPoint(3.0,playerid,1412.0840,-1701.5978,13.5395) || PlayerToPoint(3.0,playerid, -2026.543090,-101.443748,35.164062) || PlayerToPoint(3.0,playerid, 1867.345214,1443.582519,10.820312))
          	{
            	if(PlayerInfo[playerid][pBoatLic] == 0)
				{
				    if(GetPlayerCash(playerid) < 10000)
				    {
				        SendClientMessage(playerid, COLOR_GREY, "Nu ai bani destui for a sailing license");
				        return 1;
				    }
				    else
				    {
             			SendClientMessage(playerid, COLOR_LIGHTBLUE, "You bought a boat license for $10,000");
             			GivePlayerCash(playerid, - 10000);
             			PlayerInfo[playerid][pBoatLic] = 1;
             			OnPlayerUpdateEx(playerid);
             		}
				}
				else
				{
					SendClientMessage(playerid, COLOR_LIGHTBLUE, " You already own a boat license");
					return 1;
				}
			}
		}
  		return 1;
	}
//==============================================================================
// Comanda /buygunlic
//==============================================================================
	if(strcmp(cmd, "/buygunlic", true) == 0)
	{
		if(IsPlayerConnected(playerid))
       	{
			if(PlayerToPoint(3.0,playerid,1412.0840,-1701.5978,13.5395) || PlayerToPoint(3.0,playerid, -2026.543090,-101.443748,35.164062) || PlayerToPoint(3.0,playerid, 1867.345214,1443.582519,10.820312))
          	{
            	if(PlayerInfo[playerid][pGunLic] == 0)
				{
				    if(GetPlayerCash(playerid) < 10000)
				    {
				        SendClientMessage(playerid, COLOR_GREY, "Nu ai bani destui for a gun license");
				        return 1;
				    }
				    else
				    {
             			SendClientMessage(playerid, COLOR_LIGHTBLUE, "You bought a gun license for $10,000");
             			GivePlayerCash(playerid, - 10000);
             			PlayerInfo[playerid][pGunLic] = 1;
             			OnPlayerUpdateEx(playerid);
             		}
				}
				else
				{
					SendClientMessage(playerid, COLOR_LIGHTBLUE, " You already own a gun license");
					return 1;
				}
			}
		}
  		return 1;
	}
//==============================================================================
// Comanda /buyfishing
//==============================================================================
	if(strcmp(cmd, "/buyfishing", true) == 0)
	{
		if(IsPlayerConnected(playerid))
       	{
			if(PlayerToPoint(3.0,playerid,1412.0840,-1701.5978,13.5395) || PlayerToPoint(3.0,playerid, -2026.543090,-101.443748,35.164062) || PlayerToPoint(3.0,playerid, 1867.345214,1443.582519,10.820312))
          	{
            	if(PlayerInfo[playerid][pFishLic] == 0)
				{
				    if(GetPlayerCash(playerid) < 10000)
				    {
				        SendClientMessage(playerid, COLOR_GREY, "Nu ai bani destui for a fishing license");
				        return 1;
				    }
				    else
				    {
             			SendClientMessage(playerid, COLOR_LIGHTBLUE, "You bought a fishing license for $10,000");
             			GivePlayerCash(playerid, - 10000);
             			PlayerInfo[playerid][pFishLic] = 1;
             			OnPlayerUpdateEx(playerid);
             		}
				}
				else
				{
					SendClientMessage(playerid, COLOR_LIGHTBLUE, " You already own a fishing license");
					return 1;
				}
			}
		}
  		return 1;
	}
Are these better?
Reply


Messages In This Thread
Big GameMode Problem - by AlexR - 25.09.2015, 16:12
Re: Big GameMode Problem - by AlexR - 25.09.2015, 16:31
Re: Big GameMode Problem - by Aly - 25.09.2015, 17:08
Re: Big GameMode Problem - by AlexR - 25.09.2015, 17:36
Re: Big GameMode Problem - by Aly - 25.09.2015, 17:41
Re: Big GameMode Problem - by AlexR - 25.09.2015, 18:16
Re: Big GameMode Problem - by Aly - 25.09.2015, 18:20
Re: Big GameMode Problem - by AlexR - 25.09.2015, 18:30
Re: Big GameMode Problem - by Aly - 25.09.2015, 18:35
Re: Big GameMode Problem - by AlexR - 25.09.2015, 18:42

Forum Jump:


Users browsing this thread: 3 Guest(s)