sseing what weapon a payer has and changing it?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

sseing what weapon a payer has and changing it?

Post by Master-Of-Fungus-Foo-D »

HOw wouldi do this..i used search and i dont trust google to give me anything, so here i go.
I saw in the forums a whie back where you could change a players weapon using "if"

Code: Select all

if ( $player [somecommand] has kar98.tik ) [or something like tat]
{
$player takeall
$player give item blah.tik
}
ok i messed that example up.. anyway i just want to find out how to change a players weapo's model into something stupid....
(super toilet blaster :wink: )
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

if u changed it to a toilet it would not work correctly.

TO be a weapon mdoel it needs the bones for being a a weapon.

EG. tag_barrel - Where the bullet comes from. A toilet does not have a tag_barrel.



anyway u cna mess with it.

here is a whole script for changing a specific weapon.

Code: Select all



				local.randnum = randomint 1000
				$player[local.i] weaponcommand dual targetname ("weap" + local.randnum)
				local.weap = $("weap" + local.randnum)
				
	
				if(local.weap.model=="models/weapons/thompsonsmg.tik")
	local.weap.model= "models/toilet.tik" // something like this. ;)


Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

I would advise one thing more:

local.weap targentame ""

after

local.weap = $(local.num)

8-)

BTW, I was asking about this recently and jv_map provided me with the solution, search the forums first next time. :P
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

I DID SEARCH! it was a mess and i hate this search system! Anyway i was searching until 5 mins before the bus comes so i just posted here and left, so shut ya yappa'

so i couldnt change local.weap's model w/o screwing up the bones? How about hiding the weapon and spawing the toiet at the gun's origin? eh?
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

And I'm flamed for being rude... :roll:

Anyway, apparently you can hide the gun and glue a toilet to it. That'd look funny. :lol:
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Post Reply