Home   Help Search Login Register  

Author Topic: Respawn without weapons  (Read 1432 times)

0 Members and 1 Guest are viewing this topic.

TH

  • Guest
Respawn without weapons
« on: 01 Jul 2004, 23:30:02 »
is there a simple way to do this from within the editor? i tried the weapons respawn scripts from the depot but the only 1 that fits what i want has a corrupt zip file:/. I want all players to respawn without any weapons.

ponq

  • Guest
Re:Respawn without weapons
« Reply #1 on: 02 Jul 2004, 10:12:13 »
add this to the units init field:
this addEventHandler ["killed",{removeallweapons _this}]

I've heard eventhandlers aren't very good in MP, but I'd say give it a shot.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Respawn without weapons
« Reply #2 on: 02 Jul 2004, 17:16:10 »
quicker to just add the eventhandler to the init.sqs, one line does it all for all players then

INIT.sqs

Player addEventHandler ["killed",{removeallweapons Player}]
« Last Edit: 02 Jul 2004, 17:17:03 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

TH

  • Guest
Re:Respawn without weapons
« Reply #3 on: 02 Jul 2004, 21:32:17 »
er, i get an error when the first guy dies, removeallweapons _this
  • : Error removeallweapons type array expected object, and they spawn with ak's :-\
« Last Edit: 02 Jul 2004, 22:15:00 by TH »

ponq

  • Guest
Re:Respawn without weapons
« Reply #4 on: 02 Jul 2004, 22:44:04 »
tested it myself, in the units init field in the editor:
Code: [Select]
this addEventHandler ["killed",{removeallweapons s1}] Just name all the players. In the above case, the player name (in the editor) is s1.
The 2nd one s2 (and change the code accordingly).

_this and this didn't work for me (either got your error, or the weapons weren't removed).

gl.
« Last Edit: 02 Jul 2004, 22:45:05 by ponq »

TH

  • Guest
Re:Respawn without weapons
« Reply #5 on: 02 Jul 2004, 22:57:10 »
 8) works now thx ponq ;D