Loadout based on humanity

clifdayz

Well-Known Member
I thought this was going to be easy based on other threads, but it's dayz. lol.

The server is vanilla 1.8.6.1 (as opposed to epoch) plus some mods.

in server_playerLogin.sqf I thought I could just call:

_humanity = player getVariable ["humanity",0];

and then check humanity for bandit <-2000, hero>5000 and survivor. Unfortunately, _humanity is always null.

I finally figured out that the player variable "humanity" doesn't get set until server_playerSetup.sqf, which is called after server_playerLogin.

Then I thought I'd check _model for Bandit1_DZ, Survivor3_DZ(hero), else survivor, which works fine, EXCEPT if the player has put on the soldier or camo clothes.. _model is still the old one.

I might be able to replicate the code from playerSetup, but that would add another database call, which I assume would slow things a bit.

ideas?
 
Last edited:
change the players loadout in the init.sqf. One of the scripts used a variable to check if the player was a "fresh spawn" and then you would execute the script to change the players loadout.
 
Back
Top