Jump to content

Question

Posted

Cand casa e incuiata nu pot iesi din ea cu comanda /exit.. doar cand e descuiata pot iesi cu /exit

Comanda open:

[pawn] if(strcmp(cmd, "/open", true) == 0)

{

if(IsPlayerConnected(playerid))

    {

        for(new i = 0; i < sizeof(HouseInfo); i++)

{

if (PlayerToPoint(3, playerid,HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez]) || PlayerToPoint(3, playerid,HouseInfo[hExitx], HouseInfo[hExity], HouseInfo[hExitz]))

{

if(PlayerInfo[playerid][pPhousekey] == i)

{

if(HouseInfo[hLock] == 1)

{

HouseInfo[hLock] = 0;

GameTextForPlayer(playerid, "~w~UnLocked", 5000, 6);

PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);

return 1;

}

if(HouseInfo[hLock] == 0)

{

HouseInfo[hLock] = 1;

GameTextForPlayer(playerid, "~w~Locked", 5000, 6);

PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);

return 1;

}

}

else

{

GameTextForPlayer(playerid, "~r~You are not la House", 5000, 6);

return 1;

}

}

}

for(new i = 0; i < sizeof(Cazino); i++)

{

if (PlayerToPoint(3, playerid,-1754.1101,962.4252,24.8828))

{

if(PlayerInfo[playerid][pAdmin] >= 1338)

{

if(Cazino[czLocked] == 1)

{

Cazino[czLocked] = 0;

GameTextForPlayer(playerid, "~w~Casino ~g~Opened", 5000, 6);

PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);

return 1;

}

if(Cazino[czLocked] == 0)

{

Cazino[czLocked] = 1;

GameTextForPlayer(playerid, "~w~Casino ~r~Closed", 5000, 6);

PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);

return 1;

}

}

else

{

GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);

return 1;

}

}

}

for(new i = 0; i < sizeof(BizzInfo); i++)

{

if (PlayerToPoint(3, playerid,BizzInfo[bEntranceX], BizzInfo[bEntranceY], BizzInfo[bEntranceZ]) || PlayerToPoint(3, playerid,BizzInfo[bExitX], BizzInfo[bExitY], BizzInfo[bExitZ]))

{

if(PlayerInfo[playerid][pPbiskey] == i)

{

if(BizzInfo[bLocked] == 1)

{

BizzInfo[bLocked] = 0;

GameTextForPlayer(playerid, "~w~Bussiness ~g~Open", 5000, 6);

PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);

return 1;

}

if(BizzInfo[bLocked] == 0)

{

BizzInfo[bLocked] = 1;

GameTextForPlayer(playerid, "~w~Bussiness ~r~Closed", 5000, 6);

PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);

return 1;

}

}

else

{

GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);

return 1;

}

}

}

for(new i = 0; i < sizeof(SBizzInfo); i++)

{

if (PlayerToPoint(3, playerid,SBizzInfo[sbEntranceX], SBizzInfo[sbEntranceY], SBizzInfo[sbEntranceZ]))

{

if(PlayerInfo[playerid][pPbiskey] == i+100)

{

if(SBizzInfo[sbLocked] == 1)

{

SBizzInfo[sbLocked] = 0;

GameTextForPlayer(playerid, "~w~Bussiness ~g~Open", 5000, 6);

PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);

return 1;

}

if(SBizzInfo[sbLocked] == 0)

{

SBizzInfo[sbLocked] = 1;

GameTextForPlayer(playerid, "~w~Bussiness ~r~Closed", 5000, 6);

PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);

return 1;

}

}

else

{

GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);

return 1;

}

}

}

    }

    return 1;

}[/pawn]

1 answer to this question

Recommended Posts

Posted

Mura-n gura , asta e:

Comanda: /open

if(strcmp(cmd, "/open", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        for(new i = 0; i < sizeof(HouseInfo); i++)
			{
				if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]) || PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
				{
					if(PlayerInfo[playerid][pPhousekey] == i)
					{
						if(HouseInfo[i][hLock] == 1)
						{
							HouseInfo[i][hLock] = 0;
							GameTextForPlayer(playerid, "~w~Door ~g~Unlocked", 5000, 6);
							PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
							return 1;
						}
						if(HouseInfo[i][hLock] == 0)
						{
							HouseInfo[i][hLock] = 1;
							GameTextForPlayer(playerid, "~w~Door ~r~Locked", 5000, 6);
							PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
							return 1;
						}
					}
					else
					{
						GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);
						return 1;
					}
				}
			}
			for(new i = 0; i < sizeof(BizzInfo); i++)
			{
				if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]) || PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
				{
					if(PlayerInfo[playerid][pPbiskey] == i)
					{
						if(BizzInfo[i][bLocked] == 1)
						{
							BizzInfo[i][bLocked] = 0;
							GameTextForPlayer(playerid, "~w~Bussiness ~g~Open", 5000, 6);
							PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
							return 1;
						}
						if(BizzInfo[i][bLocked] == 0)
						{
							BizzInfo[i][bLocked] = 1;
							GameTextForPlayer(playerid, "~w~Bussiness ~r~Closed", 5000, 6);
							PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
							return 1;
						}
					}
					else
					{
						GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);
						return 1;
					}
				}
			}
			for(new i = 0; i < sizeof(SBizzInfo); i++)
			{
				if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
				{
					if(PlayerInfo[playerid][pPbiskey] == i+100)
					{
						if(SBizzInfo[i][sbLocked] == 1)
						{
							SBizzInfo[i][sbLocked] = 0;
							GameTextForPlayer(playerid, "~w~Bussiness ~g~Open", 5000, 6);
							PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
							return 1;
						}
						if(SBizzInfo[i][sbLocked] == 0)
						{
							SBizzInfo[i][sbLocked] = 1;
							GameTextForPlayer(playerid, "~w~Bussiness ~r~Closed", 5000, 6);
							PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
							return 1;
						}
					}
					else
					{
						GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);
						return 1;
					}
				}
			}
	    }
	    return 1;
	}

Rareori ne gândim la ceea ce avem, dar mereu la ceea ce ne lipseşte

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.