Newbie Needs Help (setVariable)

ITr1ckst3rI

Member
trying to enable player_zombieCheck on player.

(_x being the declared player)
Code:
_x setVariable ["player_zombieCheck". ????]

i have no clue how to set this back to

compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf
 
Thanks for the reply eBay. What I am trying to do is only have someone elses client recompile the sqf, not my own. So that way if I have god mode on, it won't recompile for me too. I was trying to use setVariable so that way only the player _x would recompile it.

Here is a very bad example of what i am trying to do
Code:
        _x setVehicleInit "player enableSimulation true";
        _x setVariable ["player_ZombieCheck",{compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf"},false];
 
Last edited:
Edit;

how does one force another client to change their local variable?

Code:
_x setVehicleInit "player setVariable ['player_zombieCheck', compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_zombieCheck.sqf']";

I'm trying to force another client to revert his back so zombies will attack again.

edit 2;

Also tried something like this

Code:
_x setVehicleInit " execVM 'AttractZombies.sqf'";

AttractZombies.sqf would have:

player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf"
 
Last edited:
Thanks for they reply again eBay but not quite ;)

I'm trying to do something rather simple actually.

I'm trying to freeze a player, give him god mode so while frozen they can't be hurt.

Then, when unfreezing him, remove the players god mod. I wanted to set their variables to null, so they couldn't be shot or hurt. The resest them when I unfreeze them. The issue is, I need to only reset them, and not the admin who is unfreezing them. So I'm trying to have only their client recompile the script. This is being a pain in my butt I have been trying to look for a way for the past two days now.
 
Back
Top