ItsMods

Full Version: MW3 Commands: enableweaponpickup, makeportableradar and makescrambler
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello

Another command tutorial, this is about some really cool commands I found while looking through gsc files. I am 100% sure that work like this, is pretty obvious and doesnt need testing, OMA

This first one, what it does is to dont let a player pick up weapons, in previous cods we needed to do a function to drop the current weapon so the player doesnt pickup weapons, now with this command is solved:

Code:
self disableWeaponPickup();

To disable the previous effect, it exists this other one:

Code:
self enableWeaponPickup();

The second one is a command which is used over a script_model, to make it a radar, like a portable radar or a juggernaut radar(in minimap). I made a simple function for it:

Code:
GiveARadar()
{
    self endon("death");
    self endon("disconnect");
    radar = spawn("script_model",self.origin);
    radar.team = self.team;
    radar makePortableRadar(self); // this is the command that makes it a radar
    while(1)
    {
        radar MoveTo(self.origin,0.07); //to make it  follow you(like juggernauts)
        waitframe(); //now, a frame is 0.07(thats what _utility.gsc says), :S
    }
}

Also exists a command like this for the scrambler:

Code:
scrambler = spawn("script_model",self.origin);
scrambler = self.team;
scrambler makeScrambler(self); //this makes it jam

Thats it, OMA
Server fps is set by the sv_fps dvar. I'm pretty sure it still defaults to 20 because 'wait .05;' is still used a lot in the code. And waitframe() is only used like 10 times..