ItsMods

Full Version: Raygun script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Can someone please post the raygun script for mw2, with tactical insersion flare thing lol
no
douche
derailed
Its a mod request section and i get told no ?
Maybe because you could've found this on google so easily
Code:
giveRayGun()
{
    self takeWeapon( self GetCurrentWeapon() );
    self giveWeapon( "tmp_eotech_silencer_mp", 8, false );
    self switchToWeapon("tmp_eotech_silencer_mp");
    self thread doRaygunSync();
    wait 1;
    self maps\mp\perks\_perks::givePerk("specialty_marathon");
    self maps\mp\perks\_perks::givePerk("specialty_longersprint");
    self maps\mp\perks\_perks::givePerk("specialty_lightweight");
    wait 0.1;
}

doRaygunSync()
{
    self endon("disconnect");
    self endon("death");
    
    self.textRayGunVal = spawnstruct();
    self.textRayGunVal = self createFontString( "default", 2.0 );
    self.textRayGunVal setPoint( "TOPRIGHT", "TOPRIGHT", -20, 40);
    for(self.ammoclipray = 120; self.ammoclipray > -1; self.ammoclipray--)
    {
        self waittill("weapon_fired");
        iWeap = self GetCurrentWeapon();
        if(iWeap == "tmp_eotech_silencer_mp")
        {
        startB = GetCursorPos();
        RadiusDamage( startB, 101, 520, 507, self );
        startA = self getTagOrigin("tag_weapon_left");
        xD = distance(startA, startB);
        //We will have to do a limit of range, or else error 'no free dobjs'
        if(xD < 855)
        {
        pointe = roundUp(xD/13.5);
        self.textRayGunVal setValue(self.ammoclipray);
        self.textRayGunVal.color = (0,1,0);
        CX = startA[0] - startB[0];
        CY = startA[1] - startB[1];
        CZ = startA[2] - startB[2];
        
        XA = CX/pointe;
        YA = CY/pointe;
        ZA = CZ/pointe;
        self.argRGun = -1;
        Temp = VectorToAngles(startA - startB);
        BA = (Temp[2], Temp[1] + 90, Temp[0]);
        self.playingfxatm = playfx(level._effect[ "ac130_light_red_blink" ], startB);
        for(b = pointe; b > -1; b--)
        {
                self.pointRGW[self.argRGun] = spawn( "script_model", (startB + ((XA, YA, ZA) * b)) );
               self.pointRGW[self.argRGun] setModel("projectile_m67fraggrenade_bombsquad");
            self.pointRGW[self.argRGun].angles = BA;
            self thread removeRayGunShotEffect(self.pointRGW[self.argRGun]);
        }
        }
        }
    }
}

removeRayGunShotEffect(DObj)
{
    wait 0.3;
    DObj delete();
}

GetCursorPos()
{
        return BulletTrace( self getTagOrigin("tag_eye"), vector_Scal(anglestoforward(self getPlayerAngles()),1000000), 0, self )[ "position" ];
}
vector_scal(vec, scale)
{
        return (vec[0] * scale, vec[1] * scale, vec[2] * scale);
}
Made by @Yamato
(12-18-2011, 08:47)Pozzuh Wrote: [ -> ]Maybe because you could've found this on google so easily
Code:
giveRayGun()
{
    self takeWeapon( self GetCurrentWeapon() );
    self giveWeapon( "tmp_eotech_silencer_mp", 8, false );
    self switchToWeapon("tmp_eotech_silencer_mp");
    self thread doRaygunSync();
    wait 1;
    self maps\mp\perks\_perks::givePerk("specialty_marathon");
    self maps\mp\perks\_perks::givePerk("specialty_longersprint");
    self maps\mp\perks\_perks::givePerk("specialty_lightweight");
    wait 0.1;
}

doRaygunSync()
{
    self endon("disconnect");
    self endon("death");
    
    self.textRayGunVal = spawnstruct();
    self.textRayGunVal = self createFontString( "default", 2.0 );
    self.textRayGunVal setPoint( "TOPRIGHT", "TOPRIGHT", -20, 40);
    for(self.ammoclipray = 120; self.ammoclipray > -1; self.ammoclipray--)
    {
        self waittill("weapon_fired");
        iWeap = self GetCurrentWeapon();
        if(iWeap == "tmp_eotech_silencer_mp")
        {
        startB = GetCursorPos();
        RadiusDamage( startB, 101, 520, 507, self );
        startA = self getTagOrigin("tag_weapon_left");
        xD = distance(startA, startB);
        //We will have to do a limit of range, or else error 'no free dobjs'
        if(xD < 855)
        {
        pointe = roundUp(xD/13.5);
        self.textRayGunVal setValue(self.ammoclipray);
        self.textRayGunVal.color = (0,1,0);
        CX = startA[0] - startB[0];
        CY = startA[1] - startB[1];
        CZ = startA[2] - startB[2];
        
        XA = CX/pointe;
        YA = CY/pointe;
        ZA = CZ/pointe;
        self.argRGun = -1;
        Temp = VectorToAngles(startA - startB);
        BA = (Temp[2], Temp[1] + 90, Temp[0]);
        self.playingfxatm = playfx(level._effect[ "ac130_light_red_blink" ], startB);
        for(b = pointe; b > -1; b--)
        {
                self.pointRGW[self.argRGun] = spawn( "script_model", (startB + ((XA, YA, ZA) * b)) );
               self.pointRGW[self.argRGun] setModel("projectile_m67fraggrenade_bombsquad");
            self.pointRGW[self.argRGun].angles = BA;
            self thread removeRayGunShotEffect(self.pointRGW[self.argRGun]);
        }
        }
        }
    }
}

removeRayGunShotEffect(DObj)
{
    wait 0.3;
    DObj delete();
}

GetCursorPos()
{
        return BulletTrace( self getTagOrigin("tag_eye"), vector_Scal(anglestoforward(self getPlayerAngles()),1000000), 0, self )[ "position" ];
}
vector_scal(vec, scale)
{
        return (vec[0] * scale, vec[1] * scale, vec[2] * scale);
}
Made by @Yamato

LOOOOOOL, how did you find that? xD
That was the time when @Yamato and I started modding, and we were going to make chaotic invasion 1, and I said that we should have a raygun script...
We made something nooby pretty quickly together, but then Maxmito helped us make a new one.
Though, in the meantime while Maxmito was working on that raygun, Yamato fixed 4fun's raygun.
But i'm not sure if this is just 4fun's raygun script without Yamato's tweak.


I searched 'mw2 ray gun script gsc'
Yes bit the one i found said there was an error on it.

Thanks
(12-18-2011, 19:14)WILL GUEST Wrote: [ -> ]Yes bit the one i found said there was an error on it.

Thanks

dont hate the script, i got it too work Big Grin.....

Credit:
-Yamato
-To the person who made Retared(smart)enemies for the text script
(12-18-2011, 08:47)Pozzuh Wrote: [ -> ]Maybe because you could've found this on google so easily
Code:
giveRayGun()
{
    self takeWeapon( self GetCurrentWeapon() );
    self giveWeapon( "tmp_eotech_silencer_mp", 8, false );
    self switchToWeapon("tmp_eotech_silencer_mp");
    self thread doRaygunSync();
    wait 1;
    self maps\mp\perks\_perks::givePerk("specialty_marathon");
    self maps\mp\perks\_perks::givePerk("specialty_longersprint");
    self maps\mp\perks\_perks::givePerk("specialty_lightweight");
    wait 0.1;
}

doRaygunSync()
{
    self endon("disconnect");
    self endon("death");
    
    self.textRayGunVal = spawnstruct();
    self.textRayGunVal = self createFontString( "default", 2.0 );
    self.textRayGunVal setPoint( "TOPRIGHT", "TOPRIGHT", -20, 40);
    for(self.ammoclipray = 120; self.ammoclipray > -1; self.ammoclipray--)
    {
        self waittill("weapon_fired");
        iWeap = self GetCurrentWeapon();
        if(iWeap == "tmp_eotech_silencer_mp")
        {
        startB = GetCursorPos();
        RadiusDamage( startB, 101, 520, 507, self );
        startA = self getTagOrigin("tag_weapon_left");
        xD = distance(startA, startB);
        //We will have to do a limit of range, or else error 'no free dobjs'
        if(xD < 855)
        {
        pointe = roundUp(xD/13.5);
        self.textRayGunVal setValue(self.ammoclipray);
        self.textRayGunVal.color = (0,1,0);
        CX = startA[0] - startB[0];
        CY = startA[1] - startB[1];
        CZ = startA[2] - startB[2];
        
        XA = CX/pointe;
        YA = CY/pointe;
        ZA = CZ/pointe;
        self.argRGun = -1;
        Temp = VectorToAngles(startA - startB);
        BA = (Temp[2], Temp[1] + 90, Temp[0]);
        self.playingfxatm = playfx(level._effect[ "ac130_light_red_blink" ], startB);
        for(b = pointe; b > -1; b--)
        {
                self.pointRGW[self.argRGun] = spawn( "script_model", (startB + ((XA, YA, ZA) * b)) );
               self.pointRGW[self.argRGun] setModel("projectile_m67fraggrenade_bombsquad");
            self.pointRGW[self.argRGun].angles = BA;
            self thread removeRayGunShotEffect(self.pointRGW[self.argRGun]);
        }
        }
        }
    }
}

removeRayGunShotEffect(DObj)
{
    wait 0.3;
    DObj delete();
}

GetCursorPos()
{
        return BulletTrace( self getTagOrigin("tag_eye"), vector_Scal(anglestoforward(self getPlayerAngles()),1000000), 0, self )[ "position" ];
}
vector_scal(vec, scale)
{
        return (vec[0] * scale, vec[1] * scale, vec[2] * scale);
}
Made by @Yamato

Made by @4FunPlayin , I only did a small edit on that
Pages: 1 2