30.07.2015, 20:22
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;
}


