PDA

View Full Version : LSPD Button Issue


BarFix
13/04/2016, 02:27 PM
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.


[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);

}

Godey
13/04/2016, 02:35 PM
http://forum.sa-mp.com/showthread.php?t=595307
Close enough....

BarFix
13/04/2016, 02:46 PM
Many things wrong there