Home   Help Search Login Register  

Author Topic: Editing the VecInit to make gunners need rank  (Read 1231 times)

0 Members and 1 Guest are viewing this topic.

Editing the VecInit to make gunners need rank
« on: 02 Mar 2009, 16:41:03 »
Hi: Can any1 tell me what I need write in this script to make the gunners need the same rank as the driver?
Code: [Select]
_unit = _this select 0;
_vec = _this select 1;
_Vehicle = typeOf _vec;
_rank1 = rank1;
_rank2 = rank2;
_rank3 = rank3;
_rank4 = rank4;
_rank5 = rank5;
_rank6 = rank6;
_dunit = _unit;
_warning = 0;
if (not (local _unit)) exitwith {};
if (getdammage _vec == 0) then
{
_vec setdammage 0.01;
};
if (not (isPlayer _unit)) then
{
_dunit = (leader _unit);
};
switch (_Vehicle) do

    case "M1Abrams":
    {
if (score _dunit < _rank5) then {_handle = [_dunit,_rank5] execVM "scripts\req.sqf";_unit action ["ENGINEOFF", vehicle _unit];_unit action ["Eject",vehicle _unit]};
    };
Or if someone could write me a script to make gunners need rank?