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

HP Left


Post New Thread Reply   
 
Thread Tools Display Modes
Author
TSCDan
Senior Member
Join Date: Jan 2005
Location: NY, USA
Plugin ID:
76
Plugin Version:
1.1
Plugin Category:
Statistical
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    7 
    Plugin Description:
    Displays details about your last death, including how far the attacker was and how much hp he had left
    Unapprover:
    Reason for Unapproving:
    discontinued
    Old 07-10-2007 , 10:30   HP Left
    Reply With Quote #1

    HP Left
    This is a somewhat simple plugin that, on your death, will display who killed you, with what, from how far away, and how much HP that player had left. This gets displayed to chat, and can be re-displayed by typing "hp" in chat.

    Installation
    Place hp_left.smx in your plugins directory, on server start/map change it will be loaded.

    Changelog
    1.0 - Release
    1.1 - Stupid mistake fix

    Let me know if you have any questions/comments/requests
    Attached Files
    File Type: sp Get Plugin or Get Source (hp_left.sp - 3991 views - 3.3 KB)

    Last edited by TSCDan; 07-10-2007 at 13:05.
    TSCDan is offline
    Send a message via AIM to TSCDan Send a message via MSN to TSCDan Send a message via Yahoo to TSCDan
    ^BuGs^
    Senior Member
    Join Date: May 2007
    Old 07-10-2007 , 12:31   Re: HP Left
    Reply With Quote #2

    Suggestion, make a console command "sm_hp" and it should create the !hp and /hp functionaility easier.
    __________________
    Sourcemod Plugin Author and Plugin Approver
    "The correct way is MAXPLAYERS + 1"
    I will not take bugs/new idea reports over the forums. Please use the issue list.
    ^BuGs^ is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 07-10-2007 , 12:57   Re: HP Left
    Reply With Quote #3

    Code:
     //Make sure they've died already
     if(distances[client] == 0){
      PrintToChat(client,"\x04You have not died yet")
      return Plugin_Continue
     }
    You should move this to AFTER you check if they said /hp:

    Code:
     if(strcmp(user_command[start_index],"hp",false)==0 || strcmp(user_command[start_index],"/hp",false)==0){
      printInfo(client)
     }
    Otherwise, everyone will see this message EVERYTIME they use say or say_team.
    __________________
    I'm a blast from the past!
    ferret is offline
    TSCDan
    Senior Member
    Join Date: Jan 2005
    Location: NY, USA
    Old 07-10-2007 , 13:06   Re: HP Left
    Reply With Quote #4

    ferret: Thanks, dunno how I missed that *smacks head*, although it would only have mattered if they hadn't died yet. Fixed now.

    ^BuGs^: Wouldn't that only work if I had ! or / as my admin command string? I only use @.
    TSCDan is offline
    Send a message via AIM to TSCDan Send a message via MSN to TSCDan Send a message via Yahoo to TSCDan
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 07-10-2007 , 13:11   Re: HP Left
    Reply With Quote #5

    Don't use @. You'll have problems on any server running basechat. @ has traditionally been reserved as an alias to commands related to chat features.

    If you do what Bugs is suggesting, you'll basicly just make the command sm_hp. You won't use "say" or "say_team" at all.

    You don't have to worry about chat or if there quotes. If you make "sm_hp", SourceMod will AUTOMAGICKALLY create !hp and /hp for you and take out the quotes.

    Also, if you change it to sm_hp, you should switch from "PrintToChat" to "ReplyToCommand"

    ReplyToCommand automaticly switches from "PrintToConsole" to "PrintToChat", depending on if the user typed it in console or chat.
    __________________
    I'm a blast from the past!
    ferret is offline
    TSCDan
    Senior Member
    Join Date: Jan 2005
    Location: NY, USA
    Old 07-10-2007 , 13:35   Re: HP Left
    Reply With Quote #6

    Thanks, I'll take a look into that when I get home.
    TSCDan is offline
    Send a message via AIM to TSCDan Send a message via MSN to TSCDan Send a message via Yahoo to TSCDan
    Rebell
    Veteran Member
    Join Date: Nov 2004
    Location: GERMANY
    Old 07-10-2007 , 14:05   Re: HP Left
    Reply With Quote #7

    Nice.... like oldskool ^^

    cya
    __________________
    Rebell is offline
    :THM: SFG
    Junior Member
    Join Date: Aug 2006
    Location: Berlin, Germany
    Old 07-10-2007 , 19:14   Re: HP Left
    Reply With Quote #8

    Hi TSCDan,

    a "small" feature request:
    Let the plugin show the date (distance, weapon, hp left, etc.) in a pop-up-windows (like all the menus in the left side).

    And define a server variable, so admins can set it to "on" or "off" as standard for everyone.

    And if the standard is set to "on", every player should be able to disable the function for himsel by "/hp".


    That would be really perfect!


    :THM: SFG



    €dit: Ok, now i saw someone requested a very small plugin for the chat area in the "HL2 plugin idea" forum-part and you said you will make it and here it is. But perhaps there could be a variable, too, letting the admin decide where the data should be displayed, chat-area, menu-style-window, etc.
    __________________

    Last edited by :THM: SFG; 07-10-2007 at 19:18.
    :THM: SFG is offline
    Send a message via ICQ to :THM: SFG Send a message via AIM to :THM: SFG Send a message via MSN to :THM: SFG Send a message via Yahoo to :THM: SFG Send a message via Skype™ to :THM: SFG
    TSCDan
    Senior Member
    Join Date: Jan 2005
    Location: NY, USA
    Old 07-10-2007 , 20:03   Re: HP Left
    Reply With Quote #9

    I'll see what I can do. I guess it would be a good learning experience
    TSCDan is offline
    Send a message via AIM to TSCDan Send a message via MSN to TSCDan Send a message via Yahoo to TSCDan
    :THM: SFG
    Junior Member
    Join Date: Aug 2006
    Location: Berlin, Germany
    Old 07-10-2007 , 20:04   Re: HP Left
    Reply With Quote #10

    Good to hear! Thx...
    __________________
    :THM: SFG is offline
    Send a message via ICQ to :THM: SFG Send a message via AIM to :THM: SFG Send a message via MSN to :THM: SFG Send a message via Yahoo to :THM: SFG Send a message via Skype™ to :THM: SFG
    Reply


    Thread Tools
    Display Modes

    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 01:38.


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