Raised This Month: $ Target: $400
 0% 

[L4D] Friendly House


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mr. Zero
Veteran Member
Join Date: Jun 2009
Location: Denmark
Plugin ID:
1108
Plugin Version:
0.92
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    4 
    Plugin Description:
    Disables friendly fire while survivors is still in safehouse, also includes other features such as auto pick up of medkits.
    Old 08-20-2009 , 13:01   [L4D] Friendly House
    Reply With Quote #1

    Friendly House

    Plugin Description:

    Disables friendly fire while survivors is still in safehouse, also includes other features such as auto pick up of medkits.

    Plugin Features:
    • No Friendly Fire in Safe house
      Besides of the victim not taking any damage it also prevents:
      1. Trigger of the "attacker hurt victim" message.
      2. Play blood animation of the victim.
      3. Play hurt sound of the victim.
      4. Affecting steam stats of the attacker and victim.
    • Auto pick up
      Never forget that medkit or 2nd pistol again. Upon round start survivors will auto pick up medkits and 2nd pistol (if available).

    To do:

    Remember last used primary gun and restore it if available.

    Cvars:
    A configuration file will be automaticly created for you upon first run, in /cfg/sourcemod/ called FriendlyHouse.cfg
    Code:
    // This file was auto-generated by SourceMod (v1.2.3)
    // ConVars for plugin "FriendlyHouse v0.92.smx"
    
    
    // Sets whether the plugin will make the survivors automaticly pick up medkits in safe house (only working in versus).
    // -
    // Default: "1"
    l4d_fh_autopickupkit "1"
    
    // Sets whether the plugin will make the survivors automaticly pick up a 2nd pistol in safe house, if available (only working in versus).
    // -
    // Default: "1"
    l4d_fh_autopickuppistol "1"
    
    // Sets whether the plugin is active.
    // -
    // Default: "1"
    l4d_fh_enable "1"
    
    // Friendly House Version
    // -
    // Default: "0.92"
    l4d_fh_version "0.92"
    
    // Sets whether its only in Versus the plugin is active. If 0 then it will also be active in Coop.
    // -
    // Default: "1"
    l4d_fh_versusonly "1"
    Changelog:
    Code:
    Version 0.92
    + Auto pick up of Medkits and 2nd pistol if available (only working in versus)
    ~ Changed l4d_friendlyhouse_* to l4d_fh_*
    
    Version 0.91
    + Code improvement
    
    Version 0.9
    Released
    v0.9 - 60 views
    v0.91 - 274 views
    Attached Files
    File Type: sp Get Plugin or Get Source (FriendlyHouse v0.92.sp - 3842 views - 6.1 KB)

    Last edited by Mr. Zero; 10-03-2009 at 11:36.
    Mr. Zero is offline
    olj
    Veteran Member
    Join Date: Jun 2009
    Old 08-20-2009 , 13:51   Re: [L4D] Friendly House
    Reply With Quote #2

    Nice, i really wanted such plugin WITHOUT any other features. Simple and effective. Ill give it a try when return from party (if i would be able to see my keyboard, lolz)
    EDIT:Looked at code, can you add a check if the door opened was a checkpoint one? So the event callback wont trigger on ANY door.
    __________________

    Last edited by olj; 08-20-2009 at 13:57.
    olj is offline
    Mr. Zero
    Veteran Member
    Join Date: Jun 2009
    Location: Denmark
    Old 08-20-2009 , 14:32   Re: [L4D] Friendly House
    Reply With Quote #3

    Oops.

    Posting old versions >.<

    Updated first post with the right one.

    Was think about maybe adding "medkit lock" as I call it.
    Simply lock medkits in safehouses, so each survivors have ensured at least a medkit each. On expert its really annoying having someone to use first his own medkit and then a another persons medkit.

    Last edited by Mr. Zero; 08-20-2009 at 14:37.
    Mr. Zero is offline
    olj
    Veteran Member
    Join Date: Jun 2009
    Old 08-20-2009 , 20:36   Re: [L4D] Friendly House
    Reply With Quote #4

    Quote:
    Originally Posted by Mr. Zero View Post
    Oops.

    Posting old versions >.<

    Updated first post with the right one.

    Was think about maybe adding "medkit lock" as I call it.
    Simply lock medkits in safehouses, so each survivors have ensured at least a medkit each. On expert its really annoying having someone to use first his own medkit and then a another persons medkit.
    You mean forbid using medkits in safe houses? Try slapping when someone healing in checkpoint (i suggested this in thread about preventing bots form healing you), and allow healing when they left the safehouse.
    __________________
    olj is offline
    Mr. Zero
    Veteran Member
    Join Date: Jun 2009
    Location: Denmark
    Old 08-21-2009 , 01:24   Re: [L4D] Friendly House
    Reply With Quote #5

    Na more like locking them from being picked up other then the owner of the medkit.
    So a medkit, in safe house, is tied to Zoey and if Francis then rushes to the safehouse to get an extra medkit, he won't be able to pick the medkit up. It will just say it is not his medkit.

    If Zoey then want to give her medkit to Francis, she can type !givekit Francis to allow Francis to pickup the medkit.
    Mr. Zero is offline
    olj
    Veteran Member
    Join Date: Jun 2009
    Old 08-21-2009 , 05:51   Re: [L4D] Friendly House
    Reply With Quote #6

    Quote:
    Originally Posted by Mr. Zero View Post
    Na more like locking them from being picked up other then the owner of the medkit.
    So a medkit, in safe house, is tied to Zoey and if Francis then rushes to the safehouse to get an extra medkit, he won't be able to pick the medkit up. It will just say it is not his medkit.

    If Zoey then want to give her medkit to Francis, she can type !givekit Francis to allow Francis to pickup the medkit.
    Well, that would be quite advanced coding, i cant handle such stuff yet. And i dont know how to bind item to someone, even dont know if its possible.
    P.S. You can block USE command with SM 1.3. Consider this if you will try to do such stuff.
    __________________
    olj is offline
    olj
    Veteran Member
    Join Date: Jun 2009
    Old 08-29-2009 , 04:05   Re: [L4D] Friendly House
    Reply With Quote #7

    I definetely wont use kick/ban. Dont know what others will tell. It wouldnt be so bad to have it as an option.

    What i really need - is some punishment for incorrect or abusive MOLOTOV usage, it does 5 dps to survivors with my preferences. And i really tired to kick molotov abusers. I'm not sure what is the damage type of molotov, but you can check it manually by printing it in event callback. Thanx for your work.
    __________________
    olj is offline
    LTR.2
    Veteran Member
    Join Date: Aug 2009
    Old 10-19-2009 , 15:07   Re: [L4D] Friendly House
    Reply With Quote #8

    Quote:
    Remember last used primary gun and restore it if available.
    this is being investigated right?
    LTR.2 is offline
    Mr. Zero
    Veteran Member
    Join Date: Jun 2009
    Location: Denmark
    Old 10-21-2009 , 12:49   Re: [L4D] Friendly House
    Reply With Quote #9

    Quote:
    Originally Posted by Skorpion1976 View Post
    this is only working for normal 08/15 versus. I run a 8vs8 server and 4 do not get a medikit, itīs just not in the saferoom anymore. So this plugin is not for servers which have > 4 survivors.
    It depends. If there is no more then 4 kits in saferoom, no more then 4 kits will be given out.

    PHP Code:
    new entcountmaxcount GetConVarInt(FindConVar("survivor_limit"));
        while ((
    ent FindEntityByClassnameNearby("weapon_first_aid_kit_spawn",surOrigin,AUTOPICKUP_AREA)) != -1)
        {
            if(
    count == maxcount){break;}
            
    RemoveEdict(ent);
            
    count ++;
        }
        
        if(
    count == 0){return true;}
        
        
    GiveSurvivorItems("weapon_first_aid_kit",count); 
    As you can see, it will keep finding medkits near the survivors until the count reaches survivor_limit cvar, and it will give out as many as it found.

    Quote:
    Originally Posted by LTR.2 View Post
    this is being investigated right?
    Working on it.

    Last edited by Mr. Zero; 10-21-2009 at 12:51.
    Mr. Zero is offline
    Skorpion1976
    Veteran Member
    Join Date: Jun 2009
    Location: Austria
    Old 10-25-2009 , 09:22   Re: [L4D] Friendly House
    Reply With Quote #10

    Quote:
    Originally Posted by Mr. Zero View Post
    It depends. If there is no more then 4 kits in saferoom, no more then 4 kits will be given out.

    PHP Code:
    new entcountmaxcount GetConVarInt(FindConVar("survivor_limit"));
        while ((
    ent FindEntityByClassnameNearby("weapon_first_aid_kit_spawn",surOrigin,AUTOPICKUP_AREA)) != -1)
        {
            if(
    count == maxcount){break;}
            
    RemoveEdict(ent);
            
    count ++;
        }
        
        if(
    count == 0){return true;}
        
        
    GiveSurvivorItems("weapon_first_aid_kit",count); 
    As you can see, it will keep finding medkits near the survivors until the count reaches survivor_limit cvar, and it will give out as many as it found.



    Working on it.
    So this plugins finds exactly the original 4 medkits. nothing else.
    judging from that code I could change "count" to "8" so I become independent. I will give that a try.
    EDIT: not working. I was hoping to find a workaround with this: GiveSurvivorItems("weapon_first_aid_kit",8) but it doesnīt work.

    Last edited by Skorpion1976; 10-25-2009 at 09:35.
    Skorpion1976 is offline
    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 22:47.


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