LSPD Button Issue - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: LSPD Button Issue (
/showthread.php?tid=605033)
LSPD Button Issue -
BarFix - 13.04.2016
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);
}
Re: LSPD Button Issue -
Godey - 13.04.2016
https://sampforum.blast.hk/showthread.php?tid=595307
Close enough....
Re: LSPD Button Issue -
BarFix - 13.04.2016
Many things wrong there