PDA

View Full Version : I need Help with this !


RotAway
28/07/2015, 08:54 PM
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,1 003.8000000,0.0000000,0.0000000,272.0000000);
CreateDynamicObject(2886,253.3999900,110.6000000,1 003.7000000,0.0000000,0.0000000,96.0000000);
CreateDynamicObject(2886,239.8000000,116.2000000,1 003.8000000,0.0000000,0.0000000,92.0000000);
CreateDynamicObject(2886,239.3000000,116.3000000,1 003.8000000,0.0000000,0.0000000,268.0000000);

lspddoor1= CreateDynamicObject(1569,253.2000000,107.6000000,1 002.2000100,0.0000000,0.0000000,90.0000000);
lspddoor2 = CreateDynamicObject(1569,253.2000000,110.6000000,1 002.2000100,0.0000000,0.0000000,270.0000000);
lspddoor3 = CreateDynamicObject(1569,239.5000000,116.1000000,1 002.2000100,0.0000000,0.0000000,90.0000000);
lspddoor4 = CreateDynamicObject(1569,239.5000000,119.1000000,1 002.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... ?

RotAway
28/07/2015, 09:27 PM
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

RotAway
29/07/2015, 11:33 AM
bump !

RotAway
29/07/2015, 07:44 PM
Should i give more information or post a video ? Bump2 !

Mencent
29/07/2015, 10:26 PM
Hello! ;)

forward DoorOpen();
public DoorOpen()
{
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();
public DoorClose()
{
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();
public DoorOpen2()
{
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();
public DoorClose2()
{
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;
}

And SetTimerEx to SetTimer.
Does it work then?

TenTen
29/07/2015, 10:28 PM
where's SetTimer?

RotAway
30/07/2015, 08:37 AM
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