OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: TH 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.
-
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.
-
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}]
-
er, i get an error when the first guy dies, removeallweapons _this
- : Error removeallweapons type array expected object, and they spawn with ak's :-\
-
tested it myself, in the units init field in the editor:
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.
-
8) works now thx ponq ;D