16.12.2014, 13:19
(
Последний раз редактировалось davidstyle1125; 16.12.2014 в 16:07.
)
Код:
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); } // FBI if(buttonid == FBILobbyLeftBTN[0] || buttonid == FBILobbyLeftBTN[1]) { if(PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pFaction] == 5) { MoveDynamicObject(FBILobbyLeft,293.93002319,-1498.43457031,-46.13965225,4); SetTimer("CloseFBILobbyLeft", 2500, 0); } else { SendClientMessage(playerid,COLOR_GREY,"Access denied."); return 1; } } if(buttonid == FBILobbyRightBTN[0] || buttonid == FBILobbyRightBTN[1]) { if(PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pFaction] == 5) { MoveDynamicObject(FBILobbyRight,303.84756470,-1521.62988281,-46.13965225,4); SetTimer("CloseFBILobbyRight", 2500, 0); } else { SendClientMessage(playerid,COLOR_GREY,"Access denied."); return 1; } } if(buttonid == FBIPrivateBTN[0] || buttonid == FBIPrivateBTN[1]) { if((PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2) && PlayerInfo[playerid][pRank] >= 5 || PlayerInfo[playerid][pFaction] == 5) { MoveDynamicObject(FBIPrivate[0],299.29986572,-1491.75842285,-28.73300552,4); MoveDynamicObject(FBIPrivate[1],299.33737183,-1496.86145020,-28.73300552,4); SetTimer("CloseFBIPrivate", 2500, 0); } else { SendClientMessage(playerid,COLOR_GREY,"Access denied."); return 1; } } return false; }