Little problem with HQs.
#1

Hello. I got a little problem. I was making a HQs witch can enter just Faction members, and when I write /openhq, can enter that HQ everyone, when I write /closehq can enter just faction members... But I have problem. When I write /closehq its still opened.. Here is a code, maybe someone know what to do.

Код:
new factionhq = 1;
Код:
if(strcmp(cmd, "/openhq", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	  if (PlayerToPoint(3.0, playerid,2445.5452,-1759.2820,13.5911)) //
			{
				if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
				{
				factionhq = 0;
				SendClientMessage(playerid, COLOR_GREEN, " HQ OPEN");
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
				}
	    }
Код:
if(strcmp(cmd, "/closehq", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	  if (PlayerToPoint(3.0, playerid,2445.5452,-1759.2820,13.5911)) //
			{
				if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
				{
				factionhq = 0;
				BroadCast(COLOR_RED, " HQ CLOSED");
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
				}
	    }
This is on command "/enter"

Код:
else if (PlayerToPoint(3.0, playerid,2445.5452,-1759.2820,13.5911))//
			{
				if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
			  {
				  SetPlayerInterior(playerid,9);
					SetPlayerPos(playerid,82.8803,1323.3667,1083.8662);
				  GameTextForPlayer(playerid, "~w~Welcome to Faction HQ", 5000, 1);
				}
				else if(factionhq == 0)
			  {
				  SetPlayerInterior(playerid,9);
					SetPlayerPos(playerid,82.8803,1323.3667,1083.8662);
				  GameTextForPlayer(playerid, "~w~Welcome to Faction HQ", 5000, 1);
				}
			}
and this is on "/exit"

Код:
else if (PlayerToPoint(3.0, playerid,82.8803,1323.3667,1083.8662)) //
			{
			  SetPlayerInterior(playerid,0);
				SetPlayerPos(playerid,2445.5452,-1759.2820,13.5911);
			}
Reply


Messages In This Thread
Little problem with HQs. - by kukars22 - 10.11.2008, 10:18
Re: Little problem with HQs. - by Finn - 10.11.2008, 10:46
Re: Little problem with HQs. - by kukars22 - 14.06.2009, 15:07
Re: Little problem with HQs. - by kukars22 - 24.06.2009, 21:42

Forum Jump:


Users browsing this thread: 1 Guest(s)