LSPD door not moving.
#1

Hello, in my server, the LSPD, FBI doors are not moving at all.
http://prntscr.com/40xa3k

Код HTML:
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);

	}
What can i do? im newbie on pawno
Reply
#2

Where is your MoveObject(objectid.. function ??
Reply
#3

Don't know?
as i said im not good in this shit
Reply
#4

try and play a bit with this;
https://sampwiki.blast.hk/wiki/MoveObject

you also need the position of the object when the gate is (closed) and when its (open), (move to) ad (moveback)
pawn Код:
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);
                                //moveobject here
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "   You're not a Cop / FBI!");
        }
code is alright your just missing moveobject and the timer forwarded part
Reply
#5

Show your DoorOpen function.
Reply
#6

Where's the DoorOpen function?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)