13.04.2016, 14:27
So I'm not that great with mapping buttons and binding them xD
I've pressed every key in LSPD (in range of the point) yet it still doesn't open the door ._.
LOCATION - Common LSPD building.. The first entry door.
I've pressed every key in LSPD (in range of the point) yet it still doesn't open the door ._.
LOCATION - Common LSPD building.. The first entry door.
Код:
[MAPPING] //LSPD Button lspdcopsonly = CreateButton(244.90686035156, 72.328125, 1003.9609375, 3.0); // ONLYS ONLY lspdeveryone = CreateButton(244.92, 73.42, 1004.27, 92.0); // People, ^^==LSPD
Код:
[lspdcopsonly]
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);
}

