Home   Help Search Login Register  

Author Topic: Medic Spawn / Revivescript  (Read 1816 times)

0 Members and 1 Guest are viewing this topic.

Offline Speeder

  • Members
  • *
    • OFP.nu
Medic Spawn / Revivescript
« on: 17 Apr 2007, 16:52:39 »
As I couldn't find a working mp script I'm trying to make my own.
My problem here is that when the player get's healed, his new animation isn't passed over the network, so every other player on the server will just see a dead body on his back floating around on the ground when the player is walking around after being revieved.

The problem is at #heal as far as I can tell.

I've tried messing around with the first line local player etc. but still no luck. I'm so lost atm.

Code: [Select]
;?!(local player):exit
~1
_unit = _this select 0
#start
_deadbody = player

@!(alive player)
hint FORMAT["%1 DEAD",name _unit]
_weapon = PrimaryWeapon player
_allWeapons   = weapons player
_allMagazines = magazines player


;---------------------------
@(alive player)
cutText ["", "BLACK IN",2]
;titleRsc ["MedicRED", "PLAIN"]

deleteVehicle _deadbody
_unit = Player
RemoveAllWeapons Player
player allowDammage false
[_unit] allowGetIn false
player setCaptive true
player Setdamage 0.8

HINT "YOUR DOWN\nGet the Medic!!"
_unit groupchat "Medic!!! Get the Medic!!"
_unit switchmove "AdthPercMstpSnonWnonDnon_3"

;---------------------------
#checkdead
? ((getpos player select 2) < -3) : goto "move"
~0.5
?(damage player)<0.2:goto "heal"
?!(alive player):goto "start"
?Vehicle player!= player:player Setdamage 1
goto "checkdead"

;---------------------------
#heal
~5
HINT "Healed"
player setCaptive false
player allowDammage true
player switchmove "AmovPpneMstpSrasWrflDnon"
hint FORMAT["%1 is healed",name _unit]
;---------------------------
goto "start"
;---------------------------


#move
player setpos (getmarkerpos "emergency_respawn")
goto "checkdead"
« Last Edit: 02 May 2007, 19:12:03 by Mr.Peanut »
There are 10 kinds of people in this world. Those who get it, and those who don't.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Medic Spawn / Revivescript
« Reply #1 on: 02 May 2007, 19:12:47 »
Try this.
urp!