Raised This Month: $51 Target: $400
 12% 

[ANY] Armor Pack V6.3


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Plugin ID:
3706
Plugin Version:
6.3
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allow player to buy armor with the ammount of kill they do. This is my first plugin.
    Old 06-21-2013 , 17:43   [ANY] Armor Pack V6.3
    Reply With Quote #1

    ARMOR PACK V6.3

    This plugin don't edit model, maybe later ?

    Please read :


    This is my first plugin, I'm probably a poor programmer but I still take fun doing it.
    That's why I decided to upload my first plugin and I think it can be fun too !
    I only tested this plugin on TF2 and L4D2, but he should work as well in other games.

    Description :


    This plugin allow players to buy 4 different armor with their kills. You can fully customize the plugin using a lot of Cvar, exemple : Price of armor, How much a armor protect you, and name !

    Bugs :

    Status : FIXED
    Quote:
    And [SM] Unable to load plugin "Armor_pack_V1_fix.smx": Required extension "TF2 Tools" file("game.tf2.ext") not running
    Game CSS
    Status : FIXED
    Quote:
    If players disconnected from server and reconnect later, the health and kills of player is saved.
    (by the way, I don't know why )
    Status : FIXED
    Quote:
    v3 does not work on l4d2 can you post the ver 2 it work some not on all the zombies still do damage
    you don't know how much armor you have. Never shows you
    so if it could display in the left side of the screen it would be nice
    Status : FIXED
    Quote:
    well sorry to say the armor does not protect you at all all zombies and specials and fire does damage to with it on in l4d2 the display works good
    Status : FIXED
    Status : FIXED
    Quote:
    Player in spec. team can buy a armor.

    Commands & Cvar :


    Command

    display the panel using: sm_armor, !armor, /armor

    ----------[Admin flag is cheat]----------

    Adding kills at someone : sm_addkills [PLAYER] [KILLS]

    exemple : /addkills Arkarr 48

    Cvar

    sm_hp_armor1 "20" - default 20, HP for the first armor.

    --> same for armor 2,3 and 4 (read armorpackV6.cfg in cfg/sourcemod folder.)

    sm_price_armor1 "5" - default 5, price for the first armor.

    --> same for armor 2,3 and 4 (read armorpackV6.cfg in cfg/sourcemod folder.)

    sm_name_armor1 "Basic Armor" - name of armor 1, it should begin with " and end with ".

    --> same for armor 2,3 and 4 (read armorpackV6.cfg in cfg/sourcemod folder.)

    sm_armor1_damage_absorb "30" - Amount of damage armor 1 will absorb ? 1 = 1% | 100 = 100%

    --> same for armor 2,3 and 4 (read armorpackV6.cfg in cfg/sourcemod folder.)



    Put this Cvar in armorpackV6.cfg (cfg/sourcemode), config file will be auto created when plugin will run for the first time if he doesn't exist.

    Installation :


    1) Put Armor_pack_V6.smx in your plugin folder : sourcemode/plugins
    2) Remove the old CFG file. (cfg/sourcemod/armorpackV5.cfg)
    3) Restart server, reload map or reload plugins folder.

    Require sdkhooks and morecolors to compile.

    Request and think to do :


    I am going to add some different armor type, like dammage returns (10% or more), health steal on hurt, ... If anyone think it's can be great, fun or something like that tell me, otherwise I won't do it.

    Status : DONE !
    Quote:
    Adding a percentage of dammage taking by the armor.
    Screenshot :


    (any for the moment)

    Thanks to :

    DJ Tsunami --> http://forums.alliedmods.net/showthread.php?t=218798

    He probably done the most of work, thank you a lot !

    ilga80 --> fixing a lot of compille warnings. Thank you !

    Chaosxk --> Fixing a small bug, now you can simply reload plugin folder. (Befor you needed a server/map restart)

    bl4nk --> Fixing a big security bug.

    abrandnewday --> Give me a incredible usefull tip !

    And all the other who helped me !

    Attached Files
    File Type: smx Armor_pack_V6_3.smx (14.9 KB, 426 views)
    File Type: sp Get Plugin or Get Source (Armor_pack_V6_3.sp - 529 views - 13.2 KB)

    Last edited by Arkarr; 04-08-2014 at 05:47. Reason: Plugin updated : Version 6.3
    Arkarr is offline
    ilga80
    Senior Member
    Join Date: Nov 2012
    Old 06-22-2013 , 01:32   Re: [ANY] Armor Pack V1
    Reply With Quote #2

    Armor_pack_V1.sp(29) : warning 213: tag mismatch
    Armor_pack_V1.sp(8 : warning 217: loose indentation
    Armor_pack_V1.sp(9 : warning 217: loose indentation
    Armor_pack_V1.sp(104) : warning 217: loose indentation
    Armor_pack_V1.sp(110) : warning 217: loose indentation
    Armor_pack_V1.sp(116) : warning 217: loose indentation
    Armor_pack_V1.sp(119) : warning 217: loose indentation
    Armor_pack_V1.sp(120) : warning 213: tag mismatch
    Armor_pack_V1.sp(137) : warning 213: tag mismatch
    Armor_pack_V1.sp(145) : warning 213: tag mismatch
    Armor_pack_V1.sp(14 : warning 217: loose indentation
    Armor_pack_V1.sp(151) : warning 217: loose indentation
    Armor_pack_V1.sp(164) : warning 217: loose indentation
    Armor_pack_V1.sp(16 : warning 217: loose indentation
    Armor_pack_V1.sp(175) : warning 213: tag mismatch
    ilga80 is offline
    ilga80
    Senior Member
    Join Date: Nov 2012
    Old 06-22-2013 , 01:35   Re: [ANY] Armor Pack V1
    Reply With Quote #3

    OMG
    Attached Files
    File Type: sp Get Plugin or Get Source (Armor_pack_V1_fix.sp - 989 views - 3.6 KB)
    ilga80 is offline
    ilga80
    Senior Member
    Join Date: Nov 2012
    Old 06-22-2013 , 01:36   Re: [ANY] Armor Pack V1
    Reply With Quote #4

    And [SM] Unable to load plugin "Armor_pack_V1_fix.smx": Required extension "TF2 Tools" file("game.tf2.ext") not running
    Game CSS
    ilga80 is offline
    Arkarr
    Veteran Member
    Join Date: Sep 2012
    Location: Just behind my PC screen
    Old 06-22-2013 , 02:11   Re: [ANY] Armor Pack V1
    Reply With Quote #5

    Hum, it wasn't really ready for upload ? Next time I will check it more...

    Anyway, thank you
    Arkarr is offline
    ilga80
    Senior Member
    Join Date: Nov 2012
    Old 06-22-2013 , 09:04   Re: [ANY] Armor Pack V2 - FIXED & Cvar
    Reply With Quote #6

    L 06/22/2013 - 19:01:09: [SM] Native "PrintHintText" reported: Client index 0 is
    invalid
    L 06/22/2013 - 19:01:10: [SM] Displaying call stack trace for plugin "Armor_pack
    _V2.smx":
    L 06/22/2013 - 19:01:10: [SM] [0] Line 191, Armor_pack_V2.sp::OnTakeDamage()
    How does your plugin?
    ilga80 is offline
    Arkarr
    Veteran Member
    Join Date: Sep 2012
    Location: Just behind my PC screen
    Old 06-22-2013 , 11:21   Re: [ANY] Armor Pack V2 - FIXED & Cvar
    Reply With Quote #7

    Quote:
    Originally Posted by ilga80 View Post
    L 06/22/2013 - 19:01:09: [SM] Native "PrintHintText" reported: Client index 0 is
    invalid
    L 06/22/2013 - 19:01:10: [SM] Displaying call stack trace for plugin "Armor_pack
    _V2.smx":
    L 06/22/2013 - 19:01:10: [SM] [0] Line 191, Armor_pack_V2.sp::OnTakeDamage()
    How does your plugin?
    Uploaded the wrong file, fixing that. It just was a test and wasn't supposed to be uploaded
    Arkarr is offline
    Arkarr
    Veteran Member
    Join Date: Sep 2012
    Location: Just behind my PC screen
    Old 06-22-2013 , 11:24   Re: [ANY] Armor Pack V2 - FIXED & Cvar
    Reply With Quote #8

    And sorry for double-post but can you test it on a other game than Team Fortress 2 ? Normally it should work...

    Last edited by Arkarr; 06-22-2013 at 11:25.
    Arkarr is offline
    Chaosxk
    Veteran Member
    Join Date: Aug 2010
    Location: Westeros
    Old 06-22-2013 , 16:02   Re: [ANY] Armor Pack V2 - FIXED & Cvar
    Reply With Quote #9

    You should add a OnTakeDamage Hook to OnPluginStart() so that whenever the plugin gets reloaded, it rehooks them to the damage.

    PHP Code:
    for(new 1<= MaxClientsi++) {
        if(
    IsClientInGame(i)) {
            
    SDKHook(iSDKHook_OnTakeDamageOnTakeDamage);
        }

    __________________

    Last edited by Chaosxk; 06-22-2013 at 16:03.
    Chaosxk is offline
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 06-22-2013 , 16:30   Re: [ANY] Armor Pack V2 - FIXED & Cvar
    Reply With Quote #10

    Quote:
    Originally Posted by Arkarr View Post
    If players disconnected from server and reconnect later, the health and kills of player is saved.
    (by the way, I don't know why )
    The way you have this set up is completely wrong. You should be resetting the kills and armor of the connecting client inside of OnClientPutInServer. Right now with the way it's set up, one client can disconnect, and another can connect to get their kills/armor.
    bl4nk 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 02:58.


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