Setup Player Bot (GOD MODE) need help!

QueZ

Well-Known Member
I am using a script that allows 30 seconds of god mode when a player logs in to protect him from being spawn killed (Made by Kris), during this 30 seconds, he cannot shoot (to avoid exploits/abuse) this was found by Matt L original script part by kikyou2.

To make this ANTI-SPAWN KILLING script perfect, it's missing 1 important thing. Making the Setup Bot Unkillable/God Mode.

You see, when you are on the loading screen (setup process) a bot spawns of you on the beach for example, after you are setup complete that bot is replaced by YOU that's now loaded ingame. The problem here is that the Bot regardless of the 30 seconds god mode on spawn script and all, is 100% killable.

I would like to make it invincible (god mode). This would complete the ANTI-SPAWN KILLING script perfect for release.

I will credit everyone due as well.

Thanks for the help guys!
 
has to do with the following code found in dayz_server.PBO/compile/server_playerSetup.sqf and if so, how can I go about doing this?


ORIGINAL CODE
Code:
private["_dummy"];
_dummy = getPlayerUID _playerObj;
if ( _playerID != _dummy ) then {
    diag_log format["DEBUG: _playerID miscompare with UID! _playerID:%1",_playerID];
    _playerID = _dummy;
};
 
Alternatively you could just get the location of each spawn, and place a godmode zone around each zone for maybe 5-10 meters. So when the bot spawns its within the zone. (would probably want to include that delete bullet fix as well, just incase the bot is still susceptible even under these conditions) That's alot of work though, not sure if you want to do that.
 
Alternatively you could just get the location of each spawn, and place a godmode zone around each zone for maybe 5-10 meters. So when the bot spawns its within the zone. (would probably want to include that delete bullet fix as well, just incase the bot is still susceptible even under these conditions) That's alot of work though, not sure if you want to do that.

Hey Matt, you think this would work (found in player_spawn_2.sqf)

ORIGINAL
Code:
    //CheckVehicle
    /*
    if (_refObj != player) then {
        _isSync =_refObj getVariable ["ObjectID",0] > 0;
        if (!_isSync) then {
            _veh allowDamage true;
            _veh setDamage 1;
            player setDamage 1;           
        };
    };

WHAT I THINK WOULD WORK
Code:
    //CheckVehicle
    /*
    if (_refObj != player) then {
        _isSync =_refObj getVariable ["ObjectID",0] > 0;
        if (!_isSync) then {
            _veh allowDamage false;
            _veh setDamage 0;
            player setDamage 0;           
        };
    };
 
Hey Matt, you think this would work (found in player_spawn_2.sqf)

ORIGINAL
Code:
    //CheckVehicle
    /*
    if (_refObj != player) then {
        _isSync =_refObj getVariable ["ObjectID",0] > 0;
        if (!_isSync) then {
            _veh allowDamage true;
            _veh setDamage 1;
            player setDamage 1;         
        };
    };

WHAT I THINK WOULD WORK
Code:
    //CheckVehicle
    /*
    if (_refObj != player) then {
        _isSync =_refObj getVariable ["ObjectID",0] > 0;
        if (!_isSync) then {
            _veh allowDamage false;
            _veh setDamage 0;
            player setDamage 0;         
        };
    };

No clue. Try it.
 
No clue. Try it.

Tried it, it does not work... hmm don't wanna do the safe zones, people will exploit it by never leaving (i run a deathmatch PVP server). I'll figure something out eventually and hey Matt a big props for all your answers :)
 
Tried it, it does not work... hmm don't wanna do the safe zones, people will exploit it by never leaving (i run a deathmatch PVP server). I'll figure something out eventually and hey Matt a big props for all your answers :)

In the safezone file, instead of having it have a waitUntil blah blah leaves thislist etc replace it with a sleep, therefore say after a 30 second sleep all of the files are reinstated, removing godmode
 
I really want to avoid safe zones... maybe one day i'll decided to do it, but for now I am determined there is a way to make that loading ingame bot invincible (godmode)... I will keep looking but hopefully someone will crack this code some day :)
 
tried editing the player_monitor.fsm file to not allow the player to take damage until the player has spawned?

perhaps after the player=player check, in action add player allowDamage false;, then at the end of the script do player allowDamage true;

Might work :)


*edit*
Also, please do not modify a FSM with just notepad, use the FSM Editor in the Arma Tools, it opens it in a lovely graphical interface for you to use :)
 
Back
Top