Raised This Month: $32 Target: $400
 8% 

[L4D2] Shield


Post New Thread Reply   
 
Thread Tools Display Modes
Author
panxiaohai
Senior Member
Join Date: Mar 2010
Plugin ID:
3817
Plugin Version:
1.0
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    left hand shield
    Old 08-05-2013 , 09:28   [L4D2] Shield
    Reply With Quote #1

    How to get a shield:
    1. pick up a shield and select 1 from the menu.
    2. you have chance of get a shield for killing tank or witch.
    3. input command: !shield.

    The shield will prevent damage from infected in front of you, it will show and enable if your left hand have nothing,
    The damage can be ajusted in the config.
    It is diffrent from the origin shield, you can take a single hand melee weapon in right hand and a shield in left hand at the same time.
    You can see you shield only if you are pressing E, the other players can always see your shield.

    Requirement:
    SDKHooks

    l4d_shield_new.cfg
    l4d_shield_drop_from_tank", "30.0", "chance of give a shield to tank killer[0.0, 100.0] %"
    "l4d_shield_drop_from_witch", "50.0", "chance of give a shield to witch killer[0.0, 100.0] %"

    "l4d_shield_damage_from_ci", "0.0", "common infected damage to survivor with shield[0.0, 100.0] %"
    "l4d_shield_damage_from_si", "10.0", "special infected damage to survivor with shield[0.0, 100.0] %"
    "l4d_shield_damage_from_tank", "50.0", "tank damage to survivor with shield[0.0, 100.0] %"
    "l4d_shield_damage_from_witch", "20.0", "witch damage to survivor with shield[0.0, 100.0] %"

    update:
    1.2
    add support for all melee weapon
    you can see shield when it become avalible.

    1.3
    fix problem in some sdkhook version, the damage calculation is wrong.
    Attached Thumbnails
    Click image for larger version

Name:	c10m2_drainage0044.jpg
Views:	7304
Size:	77.1 KB
ID:	123811   Click image for larger version

Name:	c10m1_caves0038.jpg
Views:	5633
Size:	83.1 KB
ID:	123816   Click image for larger version

Name:	c10m2_drainage0046.jpg
Views:	4738
Size:	72.2 KB
ID:	123817  
    Attached Files
    File Type: sp Get Plugin or Get Source (shield_new_l4d.sp - 2097 views - 23.1 KB)
    File Type: smx shield_new_l4d.smx (14.8 KB, 2504 views)

    Last edited by panxiaohai; 09-13-2013 at 08:07.
    panxiaohai is offline
    exstream
    Member
    Join Date: Feb 2013
    Old 08-06-2013 , 21:51   Re: [L4D2] Shield
    Reply With Quote #2

    im gitting this error
    L 08/06/2013 - 20:47:51: [SM] Displaying call stack trace for plugin "shield_new_l4d.smx":
    L 08/06/2013 - 20:47:51: [SM] [0] Line 532, F:\my code\addons\sourcemod\scripting\shield_new_l4 d.sp:layerOnTakeDamage()
    L 08/06/2013 - 20:47:52: [SM] Plugin encountered error 8: Not enough space on the stack
    L 08/06/2013 - 20:47:52: [SM] Native "GetClientAbsOrigin" reported:
    L 08/06/2013 - 20:47:52: [SM] Displaying call stack trace for plugin "shield_new_l4d.smx":
    L 08/06/2013 - 20:47:52: [SM] [0] Line 557, F:\my code\addons\sourcemod\scripting\shield_new_l4 d.sp:layerOnTakeDamage()
    L 08/06/2013 - 20:48:01: [SM] Plugin encountered error 8: Not enough space on the stack
    L 08/06/2013 - 20:48:01: [SM] Displaying call stack trace for plugin "shield_new_l4d.smx":
    L 08/06/2013 - 20:48:01: [SM] [0] Line 532, F:\my code\addons\sourcemod\scripting\shield_new_l4 d.sp:layerOnTakeDamage()
    any idea how to fix this
    exstream is offline
    panxiaohai
    Senior Member
    Join Date: Mar 2010
    Old 08-07-2013 , 00:41   Re: [L4D2] Shield
    Reply With Quote #3

    Quote:
    Originally Posted by exstream View Post
    im gitting this error
    L 08/06/2013 - 20:47:51: [SM] Displaying call stack trace for plugin "shield_new_l4d.smx":
    L 08/06/2013 - 20:47:51: [SM] [0] Line 532, F:\my code\addons\sourcemod\scripting\shield_new_l4 d.sp:layerOnTakeDamage()
    L 08/06/2013 - 20:47:52: [SM] Plugin encountered error 8: Not enough space on the stack
    L 08/06/2013 - 20:47:52: [SM] Native "GetClientAbsOrigin" reported:
    L 08/06/2013 - 20:47:52: [SM] Displaying call stack trace for plugin "shield_new_l4d.smx":
    L 08/06/2013 - 20:47:52: [SM] [0] Line 557, F:\my code\addons\sourcemod\scripting\shield_new_l4 d.sp:layerOnTakeDamage()
    L 08/06/2013 - 20:48:01: [SM] Plugin encountered error 8: Not enough space on the stack
    L 08/06/2013 - 20:48:01: [SM] Displaying call stack trace for plugin "shield_new_l4d.smx":
    L 08/06/2013 - 20:48:01: [SM] [0] Line 532, F:\my code\addons\sourcemod\scripting\shield_new_l4 d.sp:layerOnTakeDamage()
    any idea how to fix this
    I will try to fix it, thank you.
    panxiaohai is offline
    cooltownaz
    Member
    Join Date: Apr 2010
    Old 10-31-2013 , 16:59   Re: [L4D2] Shield
    Reply With Quote #4

    I there a way you can add a flag to this plugin so certain people with certain flags can only use it.. If i explained it correctly lol. also is there a way to hide the message that shows when it is used?
    cooltownaz is offline
    starstrucktiger
    Member
    Join Date: Jul 2012
    Location: Kansas
    Old 11-21-2013 , 20:27   Re: [L4D2] Shield
    Reply With Quote #5

    Any way you could make it so that whenever you pick up the nightstick, it will automatically equip the shield? And when you drop the night stick, you lose the shield?

    And also maybe decrease the size of the shield, so it won't glitch through the survivors legs?

    I like the idea of the riot attire.

    Last edited by starstrucktiger; 11-21-2013 at 20:29.
    starstrucktiger is offline
    sos crazy89
    Member
    Join Date: May 2015
    Location: Russia
    Old 08-30-2015 , 18:51   Re: [L4D2] Shield
    Reply With Quote #6

    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(141) : warning 213: tag mismatch
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(292) : warning 203: symbol is never used: "name"
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(354) : warning 204: symbol is assigned a value that is never used: "victim"
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(353) : warning 204: symbol is assigned a value that is never used: "attacker"
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(387) : warning 217: loose indentation
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(389) : warning 217: loose indentation
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(423) : warning 213: tag mismatch
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(884) : warning 203: symbol is never used: "CopyVector"
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(884) : warning 203: symbol is never used: "CreateMissileModel"
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(661) : warning 204: symbol is assigned a value that is never used: "GameMode"
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(661 -- 884) : warning 203: symbol is never used: "GetEnemyPostion"
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(661 -- 884) : warning 203: symbol is never used: "Glow"
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(661 -- 884) : warning 203: symbol is never used: "GlowEnt"
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(661 -- 884) : warning 203: symbol is never used: "PrintEntClass"
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(661 -- 884) : warning 203: symbol is never used: "PrintVector"
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(661 -- 884) : warning 203: symbol is never used: "SetVector"
    /home/groups/sourcemod/upload_tmp/phpy7YIch.sp(87) : warning 204: symbol is assigned a value that is never used: "g_iVelocity"
    Code size: 20784 bytes
    Data size: 7164 bytes
    Stack/heap size: 16384 bytes
    Total requirements: 44332 bytes

    17 Warnings.
    __________________
    sos crazy89 is offline
    edu.1962
    Member
    Join Date: Mar 2010
    Old 09-23-2017 , 05:07   Re: [L4D2] Shield
    Reply With Quote #7

    Please, someone can fix this plugin?
    edu.1962 is offline
    BlackSabbarh
    Senior Member
    Join Date: Sep 2018
    Old 03-06-2019 , 22:00   Re: [L4D2] Shield
    Reply With Quote #8

    Is this plugin working or does it have errors?
    BlackSabbarh is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 03-07-2019 , 17:45   Re: [L4D2] Shield
    Reply With Quote #9

    Nope, not working. I did some tests.
    Marttt is offline
    AK978
    Senior Member
    Join Date: Jun 2018
    Old 03-07-2019 , 19:02   Re: [L4D2] Shield
    Reply With Quote #10

    warning fix.
    need test.
    Attached Files
    File Type: sp Get Plugin or Get Source (shield_new_l4d_test.sp - 1077 views - 22.9 KB)

    Last edited by AK978; 03-07-2019 at 19:10.
    AK978 is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 17:57.


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