AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2] Shield (https://forums.alliedmods.net/showthread.php?t=172316)

panxiaohai 11-18-2011 20:37

[L4D2] Shield
 
26 Attachment(s)
Tank with two shield can not be hurt (gun) from left or right side;
Survivor with a shield on back (front ) can not be hurt (infected, witch, rock) from back ( front );

This is a test version ,more options will be added;

Requirement: sdk hooks

Command:
!shield : a menu for shield operation;
!shield + password : give me a shield;

Convars:

"l4d_shield_chance_tank", "100", "chance of shield tank[0.0, 100.0]" );
"l4d_shield_chance_drop", "100", "chance of drop from dead one who have shield[0.0, 100.0]" );
"l4d_shield_password", "1234", "!shield + password"

Update:
fix the crashing prblem;

version 1.1
If you hold a shield , infected can not hurt you from front;
version 1.2
fix some problem.

A simple version (shield_simple_l4d)


Shield is not a melee weapon anymore , it is just a shield, you hold it to eliminate damage;

"l4d_shield_enabled", "1", "0: diable shield, 1:enable shield");
"l4d_shield_damage_from_ci", "0", "0: can not hurt from common infected, 1:normal"
"l4d_shield_damage_from_si", "0", "0: can not hurt from special infected "
"l4d_shield_damage_from_tankrock", "0", "0: can not hurt from tankrock "
"l4d_shield_damage_from_witch", "0", "0: can not hurt from witch "
"l4d_shield_damage_from_back", "0", "0: can not hurt from back if if it's on the survivor's back, 1:normal"
"l4d_shield_password", "1234", "give me a shield !shield + password"

disawar1 11-19-2011 01:00

Re: [L4D2] Shield
 
1 Attachment(s)
aaaaaaaaaaaaaaaaa You always surprise me

__________________

server crash, your mistake is:

PHP Code:

    PrecacheModel("models/weapons/melee/v_riotshield.mdl"true );
    
PrecacheModel("models/weapons/melee/v_riotshield.mdl",true); 

to
PHP Code:

    PrecacheModel("models/weapons/melee/v_riotshield.mdl"true );
    
PrecacheModel("models/weapons/melee/w_riotshield.mdl",true); 

Where are you hurry??? :)

panxiaohai 11-19-2011 08:33

Re: [L4D2] Shield
 
Quote:

Originally Posted by disawar1 (Post 1598903)
aaaaaaaaaaaaaaaaa You always surprise me

__________________

server crash, your mistake is:

PHP Code:

    PrecacheModel("models/weapons/melee/v_riotshield.mdl"true );
    
PrecacheModel("models/weapons/melee/v_riotshield.mdl",true); 

to
PHP Code:

    PrecacheModel("models/weapons/melee/v_riotshield.mdl"true );
    
PrecacheModel("models/weapons/melee/w_riotshield.mdl",true); 

Where are you hurry??? :)

Sorry about that, I crashed too when I am testing, but I forget change the letter when copy and paste.

Mr. Man 11-19-2011 11:37

Re: [L4D2] Shield
 
Quote:

Originally Posted by panxiaohai (Post 1599076)
Sorry about that, I crashed too when I am testing, but I forget change the letter when copy and paste.

By the way, are you interested in fixing this plugin: http://forums.alliedmods.net/showthr...highlight=BOSS

disawar1 11-19-2011 22:24

Re: [L4D2] Shield
 
Mr. Man I think I have what you need, i fixing this plugin last month

Mr. Man 11-19-2011 23:11

Re: [L4D2] Shield
 
Quote:

Originally Posted by disawar1 (Post 1599450)
Mr. Man I think I have what you need, i fixing this plugin last month

Oh? Do you have an updated copy?

I posted some of the problems I ran into in that thread. (Sorry for the thread hijack!)

paul92 11-29-2011 16:26

Re: [L4D2] Shield
 
Can you use the shield to attack (like a melee weapon?)
If yes, while you use the shield, you can't take damage from FRONT damage instead of BACK damage, right?
If yes, AWESOME. If it isn't like a melee weapon, could you make it so? (And protect from FRONT damage, if using the shield, and from BACK if it's on the survivor's back)

panxiaohai 12-01-2011 03:24

Re: [L4D2] Shield
 
Quote:

Originally Posted by paul92 (Post 1604872)
Can you use the shield to attack (like a melee weapon?)
If yes, while you use the shield, you can't take damage from FRONT damage instead of BACK damage, right?
If yes, AWESOME. If it isn't like a melee weapon, could you make it so? (And protect from FRONT damage, if using the shield, and from BACK if it's on the survivor's back)

I make a simple version for you, I think you can try it.

paul92 12-01-2011 09:09

Re: [L4D2] Shield
 
I tried it, but looks like there is no difference from the normal one...
I still can't use the shield, and kill some common infected with it.
I can only put it on the back...
What is the difference? What i miss?

panxiaohai 12-01-2011 09:49

Re: [L4D2] Shield
 
Quote:

Originally Posted by paul92 (Post 1605714)
I tried it, but looks like there is no difference from the normal one...
I still can't use the shield, and kill some common infected with it.
I can only put it on the back...
What is the difference? What i miss?

I do not understand your meaning, I have confused about your sentence.

The new version is simple;
If you have a shield and hold it(you can not use it to attack as a melee weapon, because it is a shield now, it's only fucntion is prevent damage ) , you will not be hurt from front , if you hold other wepon (the shiedl go to your back), you will not be hurt from back.

I can add convars to enable shield's attacking, but I think it will be too powerful.

The old version can talk two shield, the new one can only take one shield.
The old version have two mode: front and back, the mode is select from menu. The new version switch mode between front and back automatically.
The new version is like you said: protect from FRONT damage, if using the shield, and from BACK if it's on the survivor's back


All times are GMT -4. The time now is 13:28.

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