About Vehciles - 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: About Vehciles (
/showthread.php?tid=114114)
About Vehciles -
crazydc - 17.12.2009
Hello there i am trying to code a sting command.
I have made it so it can slow the driver down but is there a way of stop the vehcile from moving but allowing the person who was sting to exit the car. i know there is a command TogglePlayerControllable but that dont allow the person to exit the vehicle. any one that could recommend a place on wiki or some code would be most greatful.
thanks a lot.
Re: About Vehciles -
Correlli - 17.12.2009
You could use TogglePlayerControllable-function like you already did and check for ENTER key under OnPlayerKeyStateChange - so if player is in the vehicle and if he presses the ENTER key then just use RemovePlayerFromVehicle-function.
Re: About Vehciles -
crazydc - 17.12.2009
thank u your a life saver.
Re: About Vehciles -
crazydc - 17.12.2009
sorry for double but how to u say if they press enter only.
i know its some think like
public OnPlayerKeyStateChange(playerid, "ENTER")
"ENTER" is me gessing.
Re: About Vehciles -
SnW - 17.12.2009
Here u go there are lot of keys
https://sampwiki.blast.hk/wiki/GetPlayerKeys
Re: About Vehciles -
dice7 - 17.12.2009
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Re: About Vehciles -
Correlli - 17.12.2009
No need for GetPlayerKeys-function, OnPlayerKeyStateChange-callback has ability to check for new keys and old keys.
Re: About Vehciles -
crazydc - 17.12.2009
well i have done it dice7 way easier code i think. proble wrong but is the ACTION key f or is it mouseclick1?
Re: About Vehciles -
Correlli - 17.12.2009
Quote:
|
Originally Posted by crazydc
well i have done it dice7 way easier code i think. proble wrong but is the ACTION key f or is it mouseclick1?
|
Код:
KEY_ACTION
1
~k~~PED_ANSWER_PHONE~
~k~~VEHICLE_FIREWEAPON~-
Re: About Vehciles -
crazydc - 17.12.2009
ok i what key is it for "f" leaveing and entering car??