Home   Help Search Login Register  

Author Topic: Addaction, but to only one specific person  (Read 1821 times)

0 Members and 1 Guest are viewing this topic.

tybeas

  • Guest
Addaction, but to only one specific person
« on: 19 Oct 2002, 19:43:36 »
Okay, I want to add an action to a guy in a map, in order to allow him to create vehicles. So I use the command line :
myguy addaction ["Create a jeep","createajeep.sqs"] for example.

The problem is that I only want HIM, and only HIM, to be able to create a jeep. The thing is that anyone who stands near that guy is now able to create a jeep (which I don't want ;) ).

So, how to avoid others to create stuff when next to that guy ?

And while I'm at it. Anyway to add an action but specificly to a particular position in a vehicles, for exemple the driver (so to do the aciton, the player would have to be in the driver seat) and not the whole vehicle itself ?

Thanks ;D

Backoff

  • Guest
Re:Addaction, but to only one specific person
« Reply #1 on: 19 Oct 2002, 22:10:56 »
Hi there tybeas  :)

For the first question, the following code will add the action to a specific player and will be only available for him:

?(Player == MyGuy): MyGuy addaction["action","action.sqs"]

For the second question, you could use a trigger like that:

x: 0
y: 0
activate: repeatedly
Condition: driver MyJeep == MyGuy && Player == MyGuy
Activation: MyAction = MyGuy addaction["action","action.sqs"]
Deactivation: MyGuy removeaction MyAction

Happy editing  8)