Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Detecting healing on a vehicle, and..  (Read 2215 times)

0 Members and 1 Guest are viewing this topic.

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Detecting healing on a vehicle, and..
« on: 17 Aug 2007, 16:53:45 »
I have a vehicle thats created by a person via the action menu on a flag pole, which then create's the vehicle at a position. That's fine. This vehicle is an ambulance vehicle which you can heal at.

I want to run a script when it's created that will check if someone else (other than the player who created it) is using it to heal, if they are then a number variable is increased on the vehicle's creator, and the same amount decreased on the person healing at it. The variable is the same for all units for the amount (it's a money variable).

I have an idea how it would work but how could i make the script global for the 2 units using it, as I think that it will only run on the vehicles creator and therefore won't be able to detect a unit nearby?

I'm totally lost in how global/local scripting works when its something originally local.

Thanks for your help.