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?
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: