Jump to content
Sign in to follow this  
bloodxgusher

Small Script Two

Recommended Posts

So since I found out that the "lockDriver" command only works if your outside the vehicle and only on military vehicles in singleplayer, I have been trying to devise a new script to handle my issue with keeping players out driver postion.

so im trying to write a small script that I can place in the init line of a Bus that I will be using in multiplayer. The script will simply teleport the player to a marker set on the map if He/She gets in the driver position of the bus.



if (player = Driver) then do (setpos getmarkerpos [PenaltyBox]);

or

if (player = Driver) then do (player playeractionnow "eject"(setpos getmarkerpos [PenaltyBox]);


I came up with this but was wondering if someone help me touch it up.

Thanks for helping.

Share this post


Link to post
Share on other sites

= is an assign

== is what you need to do to compare stuff

Syntax for if, is

if (condition) then {code};

or

if (condition) then {code} else {other code};

Not to be harsh, but I suggest learning a bit more about scripting in general, syntax etc, before even considering scripting for MP.

Share this post


Link to post
Share on other sites

Create a multiple sensor on map:

expCond="vehicle player isKindOf 'CAR';";
expActiv="if (player == driver vehicle player) then {player action ['eject',vehicle player]; player groupChat 'Get your ass out of this car!'}";

:rolleyes:

Share this post


Link to post
Share on other sites
Create a multiple sensor on map:

expCond="vehicle player isKindOf 'CAR';";
expActiv="if (player == driver vehicle player) then {player action ['eject',vehicle player]; player groupChat 'Get your ass out of this car!'}";

:rolleyes:

Hahaha Nice one. I will try these suggestions in a bit. Thanks all.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×