[Help] Lock/Unlock Car - 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] Lock/Unlock Car (
/showthread.php?tid=553578)
[Help] Lock/Unlock Car -
Arxalan - 30.12.2014
Hello , i want to lock the car in which i am sitting by pressing Button "L" or by typing /lock . and want to unlock it by pressing u or typing /unlock .
Just tell me the code of L , /lock and /unlock please.
Re: [Help] Lock/Unlock Car -
Facerafter - 30.12.2014
For locking check this tutorial.
https://sampforum.blast.hk/showthread.php?tid=363742
For the "L" button you can use
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Re: [Help] Lock/Unlock Car -
Alvord - 30.12.2014
Also, if you check this link:
https://sampwiki.blast.hk/wiki/Keys
You wouldn't see any default key for "L" on the keyboard. So just keep in mind that the person would still have to change their configuration in order to use it.
Re: [Help] Lock/Unlock Car -
Facerafter - 30.12.2014
Quote:
Originally Posted by Alvord
Also, if you check this link: https://sampwiki.blast.hk/wiki/Keys
You wouldn't see any default key for "L" on the keyboard. So just keep in mind that the person would still have to change their configuration in order to use it.
|
Is that list incomplete? I swear I have seen the use of the "f" key never changed my key bindings.
Re: [Help] Lock/Unlock Car -
Alvord - 30.12.2014
Quote:
Originally Posted by Facerafter
Is that list incomplete? I swear I have seen the use of the "f" key never changed my key bindings.
|
Yes, the key "F" for entering a vehicle in most cases can be controlled using:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(!ispassenger)
{
// DRIVER
}
if(ispassenger)
{
// PASSENGER
}
return 1;
}
more information here:
https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle