Results 1 to 5 of 5
  1. #1
    GoDZeN's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    150
    Reputation
    10
    Thanks
    1

    Exclamation Pro modders how to do this...

    Wazzaa people of MPGH i am working on an new mod so i need some help of you guys. So i want to shoot an Fx And a model just whit a pistol, machine gun whatever. And i want when you shoot it makes a sound like nuke_explosion_mp whatever:S, Thx
    Last edited by GoDZeN; 01-09-2011 at 12:45 PM.

  2. #2
    jimmynguyen3030's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    NukeTown
    Posts
    263
    Reputation
    10
    Thanks
    18
    My Mood
    Bored
    untested so sorry if it dont work
    Code:
    sound(maxtime)
    {
    	self waittill("weapon_fired");
    	iWeap = self GetCurrentWeapon();
    	if(iWeap == "GUNHERE_mp")
    	self.apple playSound( "SOUNDHERE" );
    	wait(maxtime);
    	flameFX = loadfx( "props/barrelexp" );
    	playFX(flameFX, self.apple.origin);
    	RadiusDamage(self.apple.origin,200,200,200,self);
    	self.apple playsound( "detpack_explo_default" );
    	self.apple.dead = true;
    	self.apple delete();
    }
    Last edited by jimmynguyen3030; 01-09-2011 at 04:08 PM. Reason: RONG
    If I Helped You, Plz Thanks.
    It Would Help Alot

    What Do You Do For A Living?
    I Mostly Own Noobs With The AK-47 With Silencer
    What's That?
    (Turns To Friend)
    HAHAHA Noob!!!!!!
    [img]https://www.danasof*****m/sig/asd248737.jpg[/img]

  3. #3
    Threadstarter
    Advanced Member
    GoDZeN's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    150
    Reputation
    10
    Thanks
    1
    Hmm not really what i wanted i want to shoot a fx to a location i dont want to spawn it on my location:/ still thanks

  4. #4
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    Code:
    nukeBulletz()
    { 
            for(;;) 
            { 
                    self waittill ( "weapon_fired" ); 
                    forward = self getTagOrigin("j_head"); 
                    end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000); 
                    SPLOSIONlocation = BulletTrace( forward, end, 0, self )[ "position" ]; 
                    level.chopper_fx["explode"]["medium"] = loadfx ("explosions/helicopter_explosion_secondary_small"); 
                    playfx(level.chopper_fx["explode"]["medium"], SPLOSIONlocation); 
                    RadiusDamage( SPLOSIONlocation, 500, 1000, 500, self ); 
            } 
    }
    
    vector_Scal(vec, scale)
    {
        vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
        return vec;
    }
    For one weapon only, change NukeBullets to

    Code:
    NukeBulletz()
    { 
    cur = self getCurrentWeapon();
            for(;;) 
            { 
                    if(cur == "name here")
                    self waittill ( "weapon_fired" ); 
                    forward = self getTagOrigin("j_head"); 
                    end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000); 
                    SPLOSIONlocation = BulletTrace( forward, end, 0, self )[ "position" ]; 
                    level.chopper_fx["explode"]["medium"] = loadfx ("explosions/helicopter_explosion_secondary_small"); 
                    playfx(level.chopper_fx["explode"]["medium"], SPLOSIONlocation); 
                    RadiusDamage( SPLOSIONlocation, 500, 1000, 500, self ); 
            } 
    }
    ^
    |

    Not sure if that one works however

  5. #5
    Threadstarter
    Advanced Member
    GoDZeN's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    150
    Reputation
    10
    Thanks
    1
    Thanks, will test this soon.
    Is it able to shoot sounds and the location where you hit it will play the sound.
    Last edited by GoDZeN; 01-10-2011 at 11:59 PM.

Tags for this Thread