Announcement

Collapse
No announcement yet.

AT4/RPG18 No ammo script

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [GUIDE] AT4/RPG18 No ammo script

    Write this in the "Init.sqf"

    [] execVM "NoAmmoAT4.sqf"
    "NoAmmoAT4.sqf"
    [] spawn
    {
    while {true} do
    {
    while {currentWeapon player != "M136"} do {sleep 0.5;};

    player addMagazine "M136";
    _ehId = player addEventHandler ["fired", {[_this select 0, _this select 1] spawn {player removeMagazines "M136"; while {currentWeapon player == "M136" && isNull (findDisplay 106)} do {sleep 0.5;}; (_this select 0) removeWeapon (_this select 1);};}];

    while {currentWeapon player == "M136"} do {sleep 0.5;};

    player removeEventHandler ["fired", _ehId];
    if ("M136" in magazines player) then {player removeMagazines "M136";};
    };
    };

    [] spawn
    {
    while {true} do
    {
    while {currentWeapon player != "RPG18"} do {sleep 0.5;};

    player addMagazine "RPG18";
    _ehId = player addEventHandler ["fired", {[_this select 0, _this select 1] spawn {player removeMagazines "RPG18"; while {currentWeapon player == "RPG18" && isNull (findDisplay 106)} do {sleep 0.5;}; (_this select 0) removeWeapon (_this select 1);};}];

    while {currentWeapon player == "RPG18"} do {sleep 0.5;};

    player removeEventHandler ["fired", _ehId];
    if ("RPG18" in magazines player) then {player removeMagazines "RPG18";};
    };
    };
    Credits to Inkopetant (sp?)

    TGU Instructor TG Pathfinder

    Former TGU Dean Former ARMA Admin Former Irregulars Officer

    "Do not seek death. Death will find you. But seek the road which makes death a fulfillment." - Dag Hammarskjold

  • #2
    Re: AT4/RPG18 No ammo script

    I have this script modified to also make NLAWs disposable ;) If you want then add it to the first

    Code:
    [] spawn
    {
    	while {true} do
    	{
    		while {currentWeapon player != "M136"} do {sleep 0.5;};
    		
    		player addMagazine "M136";
    		_ehId = player addEventHandler ["fired", {[_this select 0, _this select 1] spawn {player removeMagazines "M136"; while {currentWeapon player == "M136" && isNull (findDisplay 106)} do {sleep 0.5;}; (_this select 0) removeWeapon (_this select 1);};}];
    		
    		while {currentWeapon player == "M136"} do {sleep 0.5;};
    		
    		player removeEventHandler ["fired", _ehId];
    		if ("M136" in magazines player) then {player removeMagazines "M136";};
    	};
    };
    
    [] spawn
    {
    	while {true} do
    	{
    		while {currentWeapon player != "RPG18"} do {sleep 0.5;};
    		
    		player addMagazine "RPG18";
    		_ehId = player addEventHandler ["fired", {[_this select 0, _this select 1] spawn {player removeMagazines "RPG18"; while {currentWeapon player == "RPG18" && isNull (findDisplay 106)} do {sleep 0.5;}; (_this select 0) removeWeapon (_this select 1);};}];
    		
    		while {currentWeapon player == "RPG18"} do {sleep 0.5;};
    		
    		player removeEventHandler ["fired", _ehId];
    		if ("RPG18" in magazines player) then {player removeMagazines "RPG18";};
    	};
    };
    
    [] spawn
    {
    	while {true} do
    	{
    		while {currentWeapon player != "BAF_NLAW_Launcher"} do {sleep 0.5;};
    		
    		player addMagazine "NLAW";
    		_ehId = player addEventHandler ["fired", {[_this select 0, _this select 1] spawn {player removeMagazines "NLAW"; while {currentWeapon player == "BAF_NLAW_Launcher" && isNull (findDisplay 106)} do {sleep 0.5;}; (_this select 0) removeWeapon (_this select 1);};}];
    		
    		while {currentWeapon player == "BAF_NLAW_Launcher"} do {sleep 0.5;};
    		
    		player removeEventHandler ["fired", _ehId];
    		if ("NLAW" in magazines player) then {player removeMagazines "NLAW";};
    	};
    };
    - - -

    Comment

    Connect

    Collapse

    TeamSpeak 3 Server

    Collapse

    Advertisement

    Collapse

    Twitter Feed

    Collapse

    Working...
    X