I got a problem with this Doors
#1

The doors doesn't moving correctly when i press the button they just going to DoorOpen Location and they come back and the DoorClose location and when i am going out of the interior and coming back the doors are on the floor what's the problem with this ?



Код:
// 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)
		{
				MoveDynamicObject(lspddoor1, 253.2000, 111.6000, 1002.2000,270.0000000, 2.0);
				SetTimer("DoorClose", 2500, 0);
				
		}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "   You're not a Cop / FBI!");
		}

	}
   	if(buttonid == lspdeveryone)
    {

        MoveDynamicObject(lspddoor1, 253.2000, 111.6000, 1002.2000,270.0000000, 2.0);
		SetTimer("DoorClose", 2500, 0);

	}
	
	if(buttonid == lspdcopsonly2)
    {
	    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pFaction] == 5)
		{
				MoveDynamicObject(lspddoor2, 239.5416, 115.0392, 1002.2000,90.0000000, 2.0);
				SetTimer("DoorClose2", 2500, 0);

		}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "   You're not a Cop / FBI!");
		}

	}
   	if(buttonid == lspdeveryone2)
    {

		MoveDynamicObject(lspddoor2, 239.5416, 115.0392, 1002.2000,90.0000000, 2.0);
		SetTimer("DoorClose2", 2500, 0);

	}
Код:
forward DoorClose();
public DoorClose()
{
	MoveDynamicObject(lspddoor1, 253.20000, 110.10000, 1002.20001, 270.00000, 2.0);
  	return 1;
}

forward DoorClose2();
public DoorClose2()
{
    MoveDynamicObject(lspddoor2, 239.5416, 116.6033, 1002.2000, 90.00000, 2.0);
    return 1;
}
Reply
#2

I dont really understand what you're saying, can you try and explain it a bit better please.
Reply
#3

Quote:
Originally Posted by Chilli9434
Посмотреть сообщение
I dont really understand what you're saying, can you try and explain it a bit better please.
https://www.youtube.com/watch?v=87RF...ature=*********

Here you can understand everything ...
Reply
#4

Hmm, any filterscripts there Can interrupt? And is the script inside a FS or GM?
Reply
#5

Quote:
Originally Posted by canip0000
Посмотреть сообщение
Hmm, any filterscripts there Can interrupt? And is the script inside a FS or GM?
I am using yom_buttons, and i don't think so i got also some doors into my FBI interior and they are working without any problem ..
Reply
#6

Your order of parametars in MoveDynamicObject is wrong. It's MoveDynamicObject(objectid, x, y, z, speed, rx, ry, rz);. You had set it like x, y, z, rz, speed.
pawn Код:
MoveDynamicObject(lspddoor1, 253.2000, 111.6000, 1002.2000,270.0000000, 2.0);
->
MoveDynamicObject(lspddoor1, 253.2000, 111.6000, 1002.2000, 2.0, 0, 0, 270.0000000);
Reply
#7

Quote:
Originally Posted by dominik523
Посмотреть сообщение
Your order of parametars in MoveDynamicObject is wrong. It's MoveDynamicObject(objectid, x, y, z, speed, rx, ry, rz);. You had set it like x, y, z, rz, speed.
pawn Код:
MoveDynamicObject(lspddoor1, 253.2000, 111.6000, 1002.2000,270.0000000, 2.0);
->
MoveDynamicObject(lspddoor1, 253.2000, 111.6000, 1002.2000, 2.0, 0, 0, 270.0000000);
Wow it's fixed thank you very much ! I was trying to fix this for weeks ! And of course +1 rep for you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)