FBI Door Isn't Moving!
#1

Код:
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!
Reply
#2

Anyone Knows what's the problem?
Reply
#3

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

Im not getting any EROR.. its just not moving..
Reply
#5

Код:
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..
Reply
#6

Any Ideas?
Reply
#7

Help Please.
Reply
#8

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

after create tpic
Reply
#9

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


Forum Jump:


Users browsing this thread: 1 Guest(s)