Home   Help Search Login Register  

Author Topic: add an action to vehicle driver  (Read 1496 times)

0 Members and 1 Guest are viewing this topic.

Offline sharkattack

  • Former Staff
  • ****
add an action to vehicle driver
« on: 13 May 2009, 19:37:54 »
im trying to give an action to anyone who boards a civil truck in the drivers slot

blast =  ["Detonate truck bomb", {(typeOf vehicle player == "UralCivil") && (player == driver vehicle player)}] execVM"truckbomb.sqf";

guess im doing something wrong ...  anyone  offer any help  .. ?   

many thanks in advance   :good:
"HOLY SARDINE" - see Shark-Attack meet his match

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
Re: add an action to vehicle driver
« Reply #1 on: 13 May 2009, 20:51:39 »
Not tested, but have you tried:

Code: [Select]
Trigger Repetedly:

Condition: (typeOf vehicle player == "UralCivil") && (player == driver vehicle player)
onActivation: blast = vehicle player addaction ["Detonate truck bomb", "truckbomb.sqf"]; truckplayer = vehicle player
onDeactivation: truckplayer removeaction blast; truckplayer = objNull
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.

Offline sharkattack

  • Former Staff
  • ****
Re: add an action to vehicle driver
« Reply #2 on: 13 May 2009, 22:42:03 »
thanks mate ... 







« Last Edit: 19 May 2009, 21:08:25 by sharkattack »
"HOLY SARDINE" - see Shark-Attack meet his match