SA-MP Forums Archive
FBI Door Isn't Moving! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: FBI Door Isn't Moving! (/showthread.php?tid=551035)



FBI Door Isn't Moving! - davidstyle1125 - 16.12.2014

Код:
public OnPlayerPressButton(playerid, buttonid)
{
	// LSPD
   	if(buttonid == lspdcopsonly)
    {
	    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pFaction] == 5)
		{
				DoorOpen(playerid);
				SetTimer("DoorClose", 4000, 0);
		}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "   You're not a Cop / FBI!");
		}

	}
   	if(buttonid == lspdeveryone)
    {

		DoorOpen(playerid);
		SetTimer("DoorClose", 3500, 0);

	}

	// FBI
	if(buttonid == FBILobbyLeftBTN[0] || buttonid == FBILobbyLeftBTN[1])
	{
	    if(PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pFaction] == 5)
	    {
	        MoveDynamicObject(FBILobbyLeft,293.93002319,-1498.43457031,-46.13965225,4);
			SetTimer("CloseFBILobbyLeft", 2500, 0);
	    }
	    else
	    {
	        SendClientMessage(playerid,COLOR_GREY,"Access denied.");
			return 1;
		}
	}
	if(buttonid == FBILobbyRightBTN[0] || buttonid == FBILobbyRightBTN[1])
	{
	    if(PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pFaction] == 5)
	    {
	        MoveDynamicObject(FBILobbyRight,303.84756470,-1521.62988281,-46.13965225,4);
			SetTimer("CloseFBILobbyRight", 2500, 0);
	    }
	    else
	    {
	        SendClientMessage(playerid,COLOR_GREY,"Access denied.");
			return 1;
		}
	}
	if(buttonid == FBIPrivateBTN[0] || buttonid == FBIPrivateBTN[1])
	{
	    if((PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2) && PlayerInfo[playerid][pRank] >= 5 || PlayerInfo[playerid][pFaction] == 5)
	    {
	        MoveDynamicObject(FBIPrivate[0],299.29986572,-1491.75842285,-28.73300552,4);
	        MoveDynamicObject(FBIPrivate[1],299.33737183,-1496.86145020,-28.73300552,4);
			SetTimer("CloseFBIPrivate", 2500, 0);
	    }
	    else
	    {
	        SendClientMessage(playerid,COLOR_GREY,"Access denied.");
			return 1;
		}
	}
	return false;
}
Both doors not moving, LSPD and FBI.. May I get some Help guys? Thanks!


Re: FBI Door Isn't Moving! - davidstyle1125 - 16.12.2014

Anyone Knows what's the problem?


Re: FBI Door Isn't Moving! - Threshold - 16.12.2014

What is this under? What is buttonid? What error/message are you getting?


Re: FBI Door Isn't Moving! - davidstyle1125 - 16.12.2014

Im not getting any EROR.. its just not moving..


Re: FBI Door Isn't Moving! - davidstyle1125 - 16.12.2014

Код:
public OnPlayerPressButton(playerid, buttonid)
{
	// LSPD
   	if(buttonid == lspdcopsonly)
    {
	    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pFaction] == 5)
		{
				DoorOpen(playerid);
				SetTimer("DoorClose", 4000, 0);
		}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "   You're not a Cop / FBI!");
		}

	}
   	if(buttonid == lspdeveryone)
    {

		DoorOpen(playerid);
		SetTimer("DoorClose", 3500, 0);

	}

	// FBI
	if(buttonid == FBILobbyLeftBTN[0] || buttonid == FBILobbyLeftBTN[1])
	{
	    if(PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pFaction] == 5)
	    {
	        MoveDynamicObject(FBILobbyLeft,293.93002319,-1498.43457031,-46.13965225,4);
			SetTimer("CloseFBILobbyLeft", 2500, 0);
	    }
	    else
	    {
	        SendClientMessage(playerid,COLOR_GREY,"Access denied.");
			return 1;
		}
	}
	if(buttonid == FBILobbyRightBTN[0] || buttonid == FBILobbyRightBTN[1])
	{
	    if(PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pFaction] == 5)
	    {
	        MoveDynamicObject(FBILobbyRight,303.84756470,-1521.62988281,-46.13965225,4);
			SetTimer("CloseFBILobbyRight", 2500, 0);
	    }
	    else
	    {
	        SendClientMessage(playerid,COLOR_GREY,"Access denied.");
			return 1;
		}
	}
	if(buttonid == FBIPrivateBTN[0] || buttonid == FBIPrivateBTN[1])
	{
	    if((PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2) && PlayerInfo[playerid][pRank] >= 5 || PlayerInfo[playerid][pFaction] == 5)
	    {
	        MoveDynamicObject(FBIPrivate[0],299.29986572,-1491.75842285,-28.73300552,4);
	        MoveDynamicObject(FBIPrivate[1],299.33737183,-1496.86145020,-28.73300552,4);
			SetTimer("CloseFBIPrivate", 2500, 0);
	    }
	    else
	    {
	        SendClientMessage(playerid,COLOR_GREY,"Access denied.");
			return 1;
		}
	}
	return false;
}
Both doors FBI and LSPD not moving..


Re: FBI Door Isn't Moving! - davidstyle1125 - 16.12.2014

Any Ideas?


Re: FBI Door Isn't Moving! - davidstyle1125 - 16.12.2014

Help Please.


Re: FBI Door Isn't Moving! - AmirSlaYeR - 16.12.2014

read this https://sampforum.blast.hk/showthread.php?tid=507416

after create tpic


Re: FBI Door Isn't Moving! - davidstyle1125 - 17.12.2014

Okay.. I read that, but still none can assist me here -.-