I need Help with this !
#1

Код:
forward DoorOpen(playerid);
public DoorOpen(playerid)
{
	MoveDynamicObject(lspddoor1, 253.2000000,106.6130000,1002.2000100,90.0000000, 2.0);
	MoveDynamicObject(lspddoor2, 253.2000000,111.5660000,1002.2000100,270.0000000, 2.0);
  	return 1;
}

forward DoorClose(playerid);
public DoorClose(playerid)
{
	MoveDynamicObject(lspddoor1, 253.2000000,107.6000000,1002.2000100,90.0000000, 2.0);
	MoveDynamicObject(lspddoor2, 253.2000000,110.6000000,1002.2000100,270.0000000, 2.0);
  	return 1;
}

forward DoorOpen2(playerid);
public DoorOpen2(playerid)
{
	MoveDynamicObject(lspddoor3, 239.5000000,115.09200000,1002.2000000,90.0000000, 2.0);
	MoveDynamicObject(lspddoor4, 239.5996100,120.0600000,1002.2000000,270.0000000, 2.0);
	return 1;
}

forward DoorClose2(playerid);
public DoorClose2(playerid)
{
    MoveDynamicObject(lspddoor3, 239.5000000,116.1000000,1002.2000100,90.0000000, 2.0);
    MoveDynamicObject(lspddoor4, 239.5000000,119.1000000,1002.2000100,270.0000000, 2.0);
    return 1;
}
Код:
//LSPD Button
	lspdcopsonly = CreateButton(253.0000000,110.4000000,1003.8000000,272.0000000); // ONLYS ONLY
	lspdeveryone = CreateButton(253.3999900,110.6000000,1003.7000000,96.0000000); // People, ^^==LSPD
	lspdcopsonly2 = CreateButton(239.8000000,116.2000000,1003.8000000,92.0000000); // ONLY ONLY
	lspdeveryone2 = CreateButton(239.3000000,116.3000000,1003.8000000,268.0000000);
	
        CreateDynamicObject(2886,253.0000000,110.4000000,1003.8000000,0.0000000,0.0000000,272.0000000); 
 	CreateDynamicObject(2886,253.3999900,110.6000000,1003.7000000,0.0000000,0.0000000,96.0000000); 
 	CreateDynamicObject(2886,239.8000000,116.2000000,1003.8000000,0.0000000,0.0000000,92.0000000); 
	CreateDynamicObject(2886,239.3000000,116.3000000,1003.8000000,0.0000000,0.0000000,268.0000000); 

lspddoor1= CreateDynamicObject(1569,253.2000000,107.6000000,1002.2000100,0.0000000,0.0000000,90.0000000);
	lspddoor2 = CreateDynamicObject(1569,253.2000000,110.6000000,1002.2000100,0.0000000,0.0000000,270.0000000);
	lspddoor3 = CreateDynamicObject(1569,239.5000000,116.1000000,1002.2000100,0.0000000,0.0000000,90.0000000);
	lspddoor4 = CreateDynamicObject(1569,239.5000000,119.1000000,1002.2000100,0.0000000,0.0000000,270.0000000);
I got this cords on SF Police HQ interior for the doors and buttons but the problem is when i am using the buttons the doors opening well but then when you exit from the interior and come back the doors are completely down on the floor .. What's the solution of this... ?
Reply
#2

http://imgur.com/aD86Ojf,aGeKb2U Before opening the doors
http://imgur.com/aD86Ojf,aGeKb2U# After opening the doors and exit and come back into interior

Here i have some images
Reply
#3

bump !
Reply
#4

Should i give more information or post a video ? Bump2 !
Reply
#5

Hello!

PHP код:
forward DoorOpen();
public 
DoorOpen()
{
    
MoveDynamicObject(lspddoor1253.2000000,106.6130000,1002.2000100,90.00000002.0);
    
MoveDynamicObject(lspddoor2253.2000000,111.5660000,1002.2000100,270.00000002.0);
      return 
1;
}
forward DoorClose();
public 
DoorClose()
{
    
MoveDynamicObject(lspddoor1253.2000000,107.6000000,1002.2000100,90.00000002.0);
    
MoveDynamicObject(lspddoor2253.2000000,110.6000000,1002.2000100,270.00000002.0);
      return 
1;
}
forward DoorOpen2();
public 
DoorOpen2()
{
    
MoveDynamicObject(lspddoor3239.5000000,115.09200000,1002.2000000,90.00000002.0);
    
MoveDynamicObject(lspddoor4239.5996100,120.0600000,1002.2000000,270.00000002.0);
    return 
1;
}
forward DoorClose2();
public 
DoorClose2()
{
    
MoveDynamicObject(lspddoor3239.5000000,116.1000000,1002.2000100,90.00000002.0);
    
MoveDynamicObject(lspddoor4239.5000000,119.1000000,1002.2000100,270.00000002.0);
    return 
1;

And SetTimerEx to SetTimer.
Does it work then?
Reply
#6

where's SetTimer?
Reply
#7

Quote:
Originally Posted by TenTen
Посмотреть сообщение
where's SetTimer?
Код:
// 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;
}
I did some changes here is my current codes with SetTimer
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)