UrbanSkaters
Valued Member!
Anyone know why this works for all users (normal and admin):
But this doesn't work:
The first block of code works for admin and normal users, it saves the variable and loads it fine.
The second block of code works for admins fine, but only loads the variable for normal players (not save it).
AllMyKeys is an array of the users keys, in case anyone is going to ask. I've tied it to the Find my vehicle script, so that only players who have keys saved in this private "keycode list" can locate their vehicles and open it without a key in their inventory. It works fine, for all users. But that zedkills total count is puzzling, as it only seem to work for admins
Code:
allMyKeys = profileNamespace getVariable ["VehicleKeys",[]];
allMyKeys = allMyKeys + [_keySelected]; //_keySelected is set further up in the script!
profileNamespace setVariable ["VehicleKeys",allMyKeys];
But this doesn't work:
Code:
ZedKills = profileNamespace getVariable ["ZedKillsTotal",0];
_zedKillss = player getVariable["zombieKills", 0];
ZedKills = ZedKills + _zedKillss;
profileNamespace setVariable ["ZedKillsTotal",ZedKills];
The first block of code works for admin and normal users, it saves the variable and loads it fine.
The second block of code works for admins fine, but only loads the variable for normal players (not save it).
AllMyKeys is an array of the users keys, in case anyone is going to ask. I've tied it to the Find my vehicle script, so that only players who have keys saved in this private "keycode list" can locate their vehicles and open it without a key in their inventory. It works fine, for all users. But that zedkills total count is puzzling, as it only seem to work for admins
Last edited: