[Help] Lock/Unlock Car
#1

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.
Reply
#2

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
Reply
#3

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.
Reply
#4

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.
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)