Search the Community
Showing results for tags 'save loadout'.
Found 2 results
-
multiplayer Save Loadout and Position on disconnect
MrDj200 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, I need some help with this. I want to save a players position, loadout and maybe group when a player leaves the server. As we have some problems with people crashing or having IP resets or just needing to restart, this would be really neat. I looked at onPlayerDisonnected and the EH PlayerDisconnected, but I don't really know where to save the data, and how to get the position. Any help would be appreciated! -Dj -
Good day, I am having trouble with getUnitLoadout and setUnitLoadout functions. I want to make it so that when players respawn, they have the same loadout like they did before they died/respawned. But in some cases it removes the primary and secondary weapons. I am using the code below: //In onPlayerKilled.sqf I have: player setVariable ["Saved_Loadout",getUnitLoadout player]; //In onPlayerRespawn.sqf I have: player setUnitLoadout (player getVariable ["Saved_Loadout",[]]); It works when players respawn through the menu. But the problem is when they are shot and go into the incapacitated animation (I have revive enabled). I assume that when you go into the incapacitated state you lose your weapons, and then it saves your loadout when you "Hold space" to respawn. So technically you did not have a weapon when the script saved your loadout. I was thinking that the "getUnitLoadout" function should be triggered just before you go into the incapacitated state, but I am not sure how to do that. Maybe check if the player's health is below 10%? Any help would be appreciated. -MrSydney
- 4 replies
-
- setunitloadout
- getunitloadout
-
(and 3 more)
Tagged with: