SA-MP Forums Archive
Help OnPlayerPressButton not working - 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: Help OnPlayerPressButton not working (/showthread.php?tid=516231)



Help OnPlayerPressButton not working - tvt - 30.05.2014

MY Code:
Код:
new FBILobbyLeftBTN[2]
new FBILobbyLeft;
Код:
FBILobbyLeftBTN[0] = CreateButton(297.66613770,-1498.67749023,-44.59006119,0.79565430); //Lobby Button Left
FBILobbyLeftBTN[1] = CreateButton(297.24850464,-1498.23107910,-44.59006119,180); //Lobby Button Left
FBILobbyLeft = CreateDynamicObject(1536,295.40136719,-1498.43457031,-46.13965225,0.00000000,0.00000000,0.00000000,1324123, .interiorid = 1); //Lobby Door Left
Код:
public OnPlayerPressButton(playerid, buttonid)
{
	if(buttonid == FBILobbyLeftBTN[0] || buttonid == FBILobbyLeftBTN[1])
	{
	    if(IsACop(playerid))
	    {
	        MoveDynamicObject(FBILobbyLeft,293.93002319,-1498.43457031,-46.13965225,4);
			SetTimer("CloseFBILobbyLeft", 2500, 0);
	    }
	    else
	    {
	        SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
			return 1;
		}
	}
}
Код:
forward CloseFBILobbyLeft();
public CloseFBILobbyLeft()
{
	MoveDynamicObject(FBILobbyLeft,295.40136719,-1498.43457031,-46.13965225,4);
	return 1;
}
Problem:
there is not any action that occurs when the Enter / F near 'Button' above includes no (Action / Message "Acess ...")! BAD ENGLISH, Sorry


Re: Help OnPlayerPressButton not working - bare380 - 30.05.2014

Did you put the yom_buttons filterscript ?


Re: Help OnPlayerPressButton not working - tvt - 30.05.2014

Yes, I did but not effective


Re: Help OnPlayerPressButton not working - tvt - 30.05.2014

help me pleasE !


Re: Help OnPlayerPressButton not working - Acres - 30.05.2014

if you open the server you should have added buttons on the line of the filterscripts ( on server.cfg ) had same problem


Re: Help OnPlayerPressButton not working - tvt - 30.05.2014

How to do it ?


Re: Help OnPlayerPressButton not working - tvt - 30.05.2014

tks for rep, it's working