AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Holding shield with knife (https://forums.alliedmods.net/showthread.php?t=50840)

soccdoodcss 02-05-2007 00:06

Holding shield with knife
 
I have a knife only mod that may involve holding a shield also.

Dammit, can anyone think of a way to force the shield on the round start....

Problem:
When shields are off. Sometimes it switches to your primary weapon, which you can see by the ammo amount. When actually your guy is holding a knife and he can stab and such. No problem so far. However if i were to turn shields on and the player still has primary out (check the ammo) I cant give the player a shield.

Do you get what I'm saying??? Im tired and cant think straight. Any ideas are appreciated.

allenwr 02-07-2007 00:28

Re: Holding shield with knife
 
Do you mean, when a player has a primary gun, you cant give him a shield?

soccdoodcss 02-07-2007 17:41

Re: Holding shield with knife
 
Kind of... the game must register it as a primary weapon because I have ie: 30 ammo left while my guy is holding his knife. It acts normally as a knife, but I am unable to give him a shield.

allenwr 02-07-2007 19:23

Re: Holding shield with knife
 
your still not 100% clear... ammo shouldnt effect a shield and whether the following could be used.

give_item(id,"CSW_SHIELD")

thats what it is called right?

soccdoodcss 02-07-2007 22:52

Re: Holding shield with knife
 
That is what's called... it must be hard to picture...
At the begining of the round, my player is holding his knife. However the ammo of the hud shows my primary ammo

It must not register that my player is holding his knife, therefore it thinks im holding my primary. Which makes it so i cant hold a shield.

teame06 02-08-2007 00:11

Re: Holding shield with knife
 
If you are doing this

Code:
give_item(id,"CSW_SHIELD")
Then that why it doesn't work. For give_item CSW_* is not the proper way weapon name. It has it be weapon_*.

Code:
give_item(id, "weapon_shield");

allenwr 02-08-2007 00:42

Re: Holding shield with knife
 
oops, i forgot about that... use weapon, not csw

XxAvalanchexX 02-08-2007 02:01

Re: Holding shield with knife
 
Maybe him drop his primary weapon, then give him a shield.

soccdoodcss 02-08-2007 22:50

Re: Holding shield with knife
 
Quote:

Originally Posted by teame06 (Post 437049)
If you are doing this

Code:
give_item(id,"CSW_SHIELD")

Then that why it doesn't work. For give_item CSW_* is not the proper way weapon name. It has it be weapon_*.

Code:
give_item(id, "weapon_shield");

I use weapon_shield... *sigh* Oh well i give up. Ill try to make a way that prevents them from picking up any weapons at all. But thank you all for trying to help. :)

Mini_Midget 02-09-2007 02:20

Re: Holding shield with knife
 
Why can't you make the player drop his/her primary or strip_user_weapons then give the knife and shield?

But this might not be the best solution


All times are GMT -4. The time now is 00:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.