HelpI NEED A SPECIAL CODE

Posts 16–28 of 28 · Page 2 of 2
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.
Quote Originally Posted by Locke 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? )
Well, I tried, and failed.

Trying again tomorrow, get some sleep/watch some House M.D. now
Wow, i want to do this, if only i got how modding worked :/
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
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)
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.....
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
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..
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 ?
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.
he wants to keep his normal class it think eccept his secendairy that has to shoot knifes
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!
Posts 16–28 of 28 · Page 2 of 2
This thread is closed for replies.

Tags for this Thread

None

Talk with us