Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[REQUEST]Disabling weapons etc..
#1
by going trough some old mods on mw2, I found this :
Code:
Features:
Noob Toobs disabled.
Akimbo disabled.
At4 Disabled.
Painkiller disabled.
Danger Close disabled.
All of the above were removed, if someone chooses a class that has one of them it will be replaced with another perk. If it is an attachment it will only be taken away. Weapons get replaced just like the perks.

Recommended:
Use with any other GSC file.

File: _class
Download: http://pastebin.com/mcbzpxPV


Does anybody know if someting similar to that has already been made?
If so, can I have it Big Grin?
or isn't it possible in blackops?
Thanksz
--
Reply

#2
PHP Code:
ownNoobs() {
    for(;;) {
        if(
self getCurrentWeapon() == "weapon" || self getCurrentWeapon() == "weapon" || self getCurrentWeapon() == "weapon"|| self _wpContains("weapon_akimbo") || self _wpContains("weapon_akimbo") || self _wpContains("weapon_akimbo") || self _wpContains("weapon_akimbo") || self _wpContains("weapon_akimbo") || self _wpContains("weapon_akimbo") || self _hasGL()) {
            
self sayall("^2I got killed for using a ^1forbidden^2 weapon!");
            
self suicide();
        }
        else {
            
wait 0.01;
        }
    }
}

_wpContains(wpName) {
    if(
isSubStr(self getCurrentWeapon(), wpName)) {
        return 
true;
    }
    else {
        return 
false;
    }
}
_hasGL() {
    if(
self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp") {
        return 
true;
    }
    else {
        return 
false;
    }


I am not sure but it might work.
Sorry for the language I'm on French Wink


EDIT: I had not seen the pastebin link. Sry
Reply

#3
I wanna replace those guns, not kill Big Grin

tnx anyways
--
Reply

#4
(12-21-2010, 14:45)Eekhoorn Wrote: I wanna replace those guns, not kill Big Grin

tnx anyways
Freeze them is a good idea Smile
[Image: wyipjqo9qon7rc2v1lo.jpg]
Reply

#5
wutt?!
--
Reply

#6
(12-21-2010, 22:14)Eekhoorn Wrote: wutt?!
I modified his code:
Code:
ownNoobs()
{
    for(;;)
    {
            if(self getCurrentWeapon() == "weapon" || self getCurrentWeapon() == "weapon" || self getCurrentWeapon() == "weapon"|| self _wpContains("weapon_akimbo") || self _wpContains("weapon_akimbo") || self _wpContains("weapon_akimbo") || self _wpContains("weapon_akimbo") || self _wpContains("weapon_akimbo") || self _wpContains("weapon_akimbo") || self _hasGL()) {
                self sayall("^2(self.name) got raped for using a ^1forbidden^2 weapon!");
                    self takeAllWeapons();
                    wait 2.0;
                    self giveWeapon( "knife_ballistic_mp", 5, false );
                   }
                else {
                        wait 0.01;
                }
            }
    }
}

_wpContains(wpName) {
    if(isSubStr(self getCurrentWeapon(), wpName)) {
        return true;
    }
    else {
        return false;
    }
}
_hasGL() {
    if(self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp" || self getCurrentWeapon() == "gl_weapon_mp") {
        return true;
    }
    else {
        return false;
    }
}
Not sure if it works
EDIT: Fixed up a bit
[Image: wyipjqo9qon7rc2v1lo.jpg]
Reply

#7
lol this is easy
Reply

#8
player_logic:

Code:
if(isSubStr(self getCurrentWeapon(), "WEAPON NAME"))
iDamage = 0;

[Image: 1fxsnb.jpg]
Reply

#9
Another way to do it:

Code:
checkPlayerWeapon()
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "joined_spectator" );
    
    // add new entries for each weapon
    level.badWeapons = [];
    level.badWeapons[0] = "ak47_mp";
    level.replacementWeapon = "asp_mp";
    
    while(1)
    {
        for( i = 0; i < level.badWeapons.size; i++ )
        {
            if( self getCurrentWeapon() == level.badWeapons[i] )
            {
                self takeWeapon( self getCurrentWeapon() );
                self giveWeapon( level.replacementWeapon );
            }
        }
        
        wait 0.05;
    }
}
Reply

#10
thanks for all being sooooo helpfull

TRYing it now
--
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] [SOURCE] Random Weapons. [HARD] Tony. 1 4,142 11-08-2013, 11:11
Last Post: Nekochan
  Help source random weapons [HARD] Tony. 4 4,747 11-08-2013, 05:25
Last Post: [HARD] Tony.
  MW3 Hide WEAPONS [HARD] Tony. 7 7,212 10-09-2013, 15:16
Last Post: [HARD] Tony.
  [Request] Request for Assistance with Modding COD: BO using Mod Tools one1lion 9 6,722 09-17-2013, 21:04
Last Post: one1lion
  [Request] Airdrop Heaven mod The_Reaper_1 0 2,472 09-10-2013, 14:13
Last Post: The_Reaper_1
  [Request] Request for !afk and !balance plugins. UlTiiMaTuM 3 3,600 09-10-2013, 02:13
Last Post: UlTiiMaTuM
  Porting some weapons, ADS broken? DidUknowiPwn 0 2,407 09-10-2013, 01:13
Last Post: DidUknowiPwn
  [Request] Mw2 lock weapons seraph1995 1 3,355 08-18-2013, 15:31
Last Post: DidUknowiPwn
  [Release] Pack-A-Punch Weapons TheSchitt 40 31,903 08-07-2013, 04:51
Last Post: FrostLight
  Help DONATE points for weapons [HARD] Tony. 10 7,527 05-24-2013, 10:59
Last Post: Pozzuh

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.