Jump to content
Sign in to follow this  
kammorne

Players/NPCs respawning without weapons

Recommended Posts

I'm not completely new to editing on ArmA 2 but I do need help with one problem.

I need a script or something to remove weapons from players on respawn.

For example, I have a player dying with an M107 that he found. After respawning (he would be a USMC Rifleman) he respawns with a M16A4, how can I make it so He respawns with only a Backpack?

Thanks for any help you can give.

Share this post


Link to post
Share on other sites

This is not tested but should work.

init.sqf (could be used init in other ways depending on your mission structure, but we would need more info.

_index = _myPlayerName addMPEventHandler ["MPRespawn", {
removeAllWeapons (_this select 0);
removeAllItems (_this select 0);
(_this select 0) addBackpack "TK_RPG_Backpack_EP1";
}];

Share this post


Link to post
Share on other sites

Thanks for the script but unfortunately it didn't work.

What I am trying to do is to have someone be killed by another player, but then when he respawns he spawns with the items he started with at the start of the mission.

EG: (BLUFOR) Rifleman starting with just a "US_Patrol_Pack_EP1", He then finds a weapon/item "M9". Someone else then kills the player. After he respawns he starts with starting Rifleman Items and a M16A4 instead of just his Patrol Pack.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×