Page 2 of 2 FirstFirst 12
Results 16 to 28 of 28
  1. #16
    Locke's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Bergen, Norway
    Posts
    804
    Reputation
    6
    Thanks
    67
    My Mood
    Yeehaw
    Actually, I don't think this is what the threadstarter wants eihter. Beause the code only makes the weapon shoot out regular bullets who is disguised to look like throwing knives. When you kill a person with the gun, it will say that you killed him with a Mini-Uzi and not a TK. Also, you cannot for example shoot straight up, and then watch a bunch of TK's falling to the ground in front of you a few seconds later.

  2. #17
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by Mr T View Post
    Actually, I don't think this is what the threadstarter wants eihter. Beause the code only makes the weapon shoot out regular bullets who is disguised to look like throwing knives. When you kill a person with the gun, it will say that you killed him with a Mini-Uzi and not a TK. Also, you cannot for example shoot straight up, and then watch a bunch of TK's falling to the ground in front of you a few seconds later.
    If you want to make that.
    Go on

    But that is hard to make. ( I don't want to start on it anyway)

    Here is the code:
    if ( weapon != "throwingknife_mp" )
    {
    switch ( meansOfDeath )
    {
    case "MOD_FALLING":
    case "MOD_MELEE":
    break;
    (Sorry, But I have to go very soon, so I can't make this so it works the right way.. I guess you can figure that out yourself? )
    Last edited by Jorndel; 06-05-2011 at 04:01 PM.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  3. #18
    Locke's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Bergen, Norway
    Posts
    804
    Reputation
    6
    Thanks
    67
    My Mood
    Yeehaw
    Well, I tried, and failed.

    Trying again tomorrow, get some sleep/watch some House M.D. now

  4. #19
    HexJr's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    114
    Reputation
    24
    Thanks
    4
    Wow, i want to do this, if only i got how modding worked :/

  5. #20
    RAZUBA's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    u would want to knwo wouldn't u
    Posts
    14
    Reputation
    10
    Thanks
    0
    sooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooooo
    after u 2 pro coders finding it our can i plz get the code and whoever makes it ill give credits to u in the mod itself

    but yes all i want is a straight up ordinary fal shooting throwing knifes which looks and kills like a throwing knife

    is it possible?

    thnx in advance

  6. #21
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by RAZUBA View Post
    sooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooooo
    after u 2 pro coders finding it our can i plz get the code and whoever makes it ill give credits to u in the mod itself

    but yes all i want is a straight up ordinary fal shooting throwing knifes which looks and kills like a throwing knife

    is it possible?

    thnx in advance
    Well, this is the action for the looking:
    Code:
    doGun()
    {
    	self takeAllWeapons();
    	self giveWeapon("uzi_xmags_mp", 0, false);
    	self giveMaxAmmo("uzi_xmags_mp");
    	wait 0.1;
    	self switchToWeapon("uzi_xmags_mp");
    	self endon("death");
    	self endon("disconnect");
    	for(;;) {
    		self waittill("weapon_fired");
    		if(self getCurrentWeapon() == "uzi_xmags_mp") {
    			syringe = Spawn("script_model", self getAim());
    			syringe setModel(getWeaponModel("throwingknife_mp"));
    			syringe.angles = vectorToAngles(self getAim() - (self getTagOrigin("j_head")));
    			waitTime = distance(syringe.origin, self getAim()) / 10000;
    			syringe moveTo(self getAim(), waitTime);
    			syringe thread dropToGround(self, self getAim());
    			self thread deleteAfterTimeout(syringe);
    		}
    	}
    }
    
    getAim()
    {
        forward = self getTagOrigin("tag_eye");
    	end = self vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
    	Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
    	return Crosshair;
    }
    
    vector_scal(vec, scale)
    {
            vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
            return vec;
    }
    The wep that you need here is: mini-uzi with exstra mags.
    uzi_xmags_mp
    Change whats in red to your wep, this code auto give you the Uzi.

    And for the death.
    Look at my post above (Forgot to say)
    Last edited by Jorndel; 06-06-2011 at 04:45 AM.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  7. #22
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    154
    My Mood
    Amazed
    Quote Originally Posted by jorndel View Post
    Well, this is the action for the looking:
    Code:
    doGun()
    {
    	self takeAllWeapons();
    	self giveWeapon("uzi_xmags_mp", 0, false);
    	self giveMaxAmmo("uzi_xmags_mp");
    	wait 0.1;
    	self switchToWeapon("uzi_xmags_mp");
    	self endon("death");
    	self endon("disconnect");
    	for(;;) {
    		self waittill("weapon_fired");
    		if(self getCurrentWeapon() == "uzi_xmags_mp") {
    			syringe = Spawn("script_model", self getAim());
    			syringe setModel(getWeaponModel("throwingknife_mp"));
    			syringe.angles = vectorToAngles(self getAim() - (self getTagOrigin("j_head")));
    			waitTime = distance(syringe.origin, self getAim()) / 10000;
    			syringe moveTo(self getAim(), waitTime);
    			syringe thread dropToGround(self, self getAim());
    			self thread deleteAfterTimeout(syringe);
    		}
    	}
    }
    
    getAim()
    {
        forward = self getTagOrigin("tag_eye");
    	end = self vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
    	Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
    	return Crosshair;
    }
    
    vector_scal(vec, scale)
    {
            vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
            return vec;
    }
    The wep that you need here is: mini-uzi with exstra mags.

    Change whats in red to your wep, this code auto give you the Uzi.

    And for the death.
    Look at my post above (Forgot to say)
    Thats not all the code that master131 added to the blank _rank.gsc.....

  8. #23
    turmwin's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    My Mood
    Fine
    So is this:
    Code:
    doGun()
    {
    	self endon("death");
    	self endon("disconnect");
    	for(;;) {
    		self waittill("weapon_fired");
    		if(self getCurrentWeapon() == "uzi_xmags_mp") {
    			syringe = Spawn("script_model", self getAim());
    			syringe setModel(getWeaponModel("throwingknife_mp"));
    			syringe.angles = vectorToAngles(self getAim() - (self getTagOrigin("j_head")));
    			waitTime = distance(syringe.origin, self getAim()) / 10000;
    			syringe moveTo(self getAim(), waitTime);
    			syringe thread dropToGround(self, self getAim());
    			self thread deleteAfterTimeout(syringe);
    		}
    	}
    }
    
    getAim()
    {
        forward = self getTagOrigin("tag_eye");
    	end = self vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
    	Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
    	return Crosshair;
    }
    
    vector_scal(vec, scale)
    {
            vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
            return vec;
    }
    When i already have the weapon and dont want that all weapons get taken away??

    sry for my bad English

  9. #24
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by turmwin View Post
    So is this:
    Code:
    doGun()
    {
    	self endon("death");
    	self endon("disconnect");
    	for(;;) {
    		self waittill("weapon_fired");
    		if(self getCurrentWeapon() == "uzi_xmags_mp") {
    			syringe = Spawn("script_model", self getAim());
    			syringe setModel(getWeaponModel("throwingknife_mp"));
    			syringe.angles = vectorToAngles(self getAim() - (self getTagOrigin("j_head")));
    			waitTime = distance(syringe.origin, self getAim()) / 10000;
    			syringe moveTo(self getAim(), waitTime);
    			syringe thread dropToGround(self, self getAim());
    			self thread deleteAfterTimeout(syringe);
    		}
    	}
    }
    
    getAim()
    {
        forward = self getTagOrigin("tag_eye");
    	end = self vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
    	Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
    	return Crosshair;
    }
    
    vector_scal(vec, scale)
    {
            vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
            return vec;
    }
    When i already have the weapon and dont want that all weapons get taken away??

    sry for my bad English
    Yeh, it made not much sence.

    But when you use this code. (Copy & Paste)
    You will lose all other weapons..

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  10. #25
    turmwin's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    My Mood
    Fine
    And how can i do it, that i wont loose all other weapons, but want to have my normal class and shooting my secondary weapon Tk's ?

  11. #26
    Locke's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Bergen, Norway
    Posts
    804
    Reputation
    6
    Thanks
    67
    My Mood
    Yeehaw
    Quote Originally Posted by turmwin View Post
    And how can i do it, that i wont loose all other weapons, but want to have my normal class and shooting my secondary weapon Tk's ?
    Dude, that doesn't make sense. You want to get rid of all weapons but keep your class? So that mean you don't want to get rid of any weapons? Please try to explain.

  12. #27
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    he wants to keep his normal class it think eccept his secendairy that has to shoot knifes

  13. #28
    turmwin's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    My Mood
    Fine
    Quote Originally Posted by pyrozombie View Post
    he wants to keep his normal class it think eccept his secendairy that has to shoot knifes
    you are right!

Page 2 of 2 FirstFirst 12