SA-MP Forums Archive
Enetring houses - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Enetring houses (/showthread.php?tid=204664)



Enetring houses - antsolen - 30.12.2010

Hello , how i can change that if i want to enter 24/7 or lspd i need to press F

IM BAD ENGLISH


Re: Enetring houses - _rAped - 30.12.2010

Check out OnPlayerKeyStateChange()


Re: Enetring houses - Toreno - 30.12.2010

Take this and enter your system / codes:

It checks if you pressed F and you are not in a car, then it works.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(!IsPlayerInAnyVehicle(playerid) && newkeys & KEY_SECONDARY_ATTACK)
    {
        /* Your house system code should be here */
    }
    return 1;
}