01.12.2015, 09:54
When i go near LSPD button and press F nothing happens....here are my codes.
DoorOpen:
LSPD Buttons:
It don't even show me this error:
PHP Code:
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);
}
PHP Code:
forward DoorOpen(playerid);
public DoorOpen(playerid)
{
MoveDynamicObject(lspddoor1, 247.2763671875,72.536186218262,1002.640625, 3.5000);
MoveDynamicObject(lspddoor2, 244.0330657959,72.580932617188,1002.640625, 3.5000);
return 1;
}
PHP Code:
//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
CreateDynamicObject(2886, 244.90686035156, 72.328125, 1003.9609375,0,0,3.0, 20002); //lspdcopsonly button
CreateDynamicObject(2886, 244.92, 73.42, 1004.27,0,0,92.0, 20002); //lspdeveryone button
lspddoor1 = CreateDynamicObject(1569, 246.35150146484, 72.547714233398, 1002.640625, 0.000000, 0.000000, 0.000000); //
lspddoor2 = CreateDynamicObject(1569, 245.03300476074, 72.568511962891, 1002.640625, 0.000000, 0.000000, 0.000000); //
Code:
You're not a Cop / FBI