Raised This Month: $168 Target: $400
 42% 

[L4D & L4D2] Achievement Trophy (2.2) [25-May-2012]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
1907
Plugin Version:
2.2
Plugin Category:
Fun Stuff
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    63 
    Plugin Description:
    Displays the TF2 trophy when somebody unlocks an achievement, also can switch display in ThirdPerson view.
    Old 08-23-2010 , 16:14   [L4D & L4D2] Achievement Trophy (2.2) [25-May-2012]
    Reply With Quote #1

    About:
    • Displays the TF2 trophy above players heads when they earn an achievement.
    • Can put the player into thirdperson view (L4D2 only).


    Example Picture:
    A picture is worth a thousand words:




    CVars:

    Saved to l4d_trophy.cfg in your servers \cfg\sourcemod\ folder.

    PHP Code:
    // Achievement Trophy plugin version.
    l4d_trophy_version

    // 0=Plugin off, 1=Plugin on.
    l4d_trophy_allow "1"

    // Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
    l4d_trophy_modes ""

    // Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
    l4d_trophy_modes_off ""

    // Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
    l4d_trophy_modes_tog "0"

    // Which effects to display. 1=Trophy, 2=Fireworks, 3=Both.
    l4d_trophy_effects "3"

    // 0.0=Off. How long to put the player into thirdperson view.
    l4d_trophy_third "4.0"

    // Remove the particle effects after this many seconds. Increase time to make the effect loop.
    l4d_trophy_time "3.5"

    // Replay the particles after this many seconds.
    l4d_trophy_wait "3.5" 


    Changes:
    Code:
    2.2 (25-May-2012)
        - Fixed not creating trophies due to Survivor Thirdperson plugin.
    
    2.1 (21-May-2012)
        - Fixed achievement event using the wrong data. Thanks to "disawar1".
    
    2.0 (20-May-2012)
        - Plugin has been totally re-written. Delete the old plugin and cvars config.
        - Allow and Mode cvars added.
        - Fixed errors being logged.
        - Thirdperson now works for survivors in L4D2 only.
    
    1.4 (04-Oct-2010)
        - retroGamer's versions.
    
    1.3 (30-Aug-2010)
        - Added version cvar.
        - Attempted to cache particles by playing OnClientPutInServer.
    
    1.2 (25-Aug-2010)
        - Added more particles (mini fireworks)!
        - UnhookEvent when plugin turned off.
    
    1.1.1 (25-Aug-2010)
        - Removed 1 event per second limit.
    
    1.1 (25-Aug-2010)
        - Moved event hook from OnMapStart to OnPluginStart.
    
    1.0 (23-Aug-2010)
        - Initial release.


    Installation:
    1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.

    Updating to 2.0:
    • Delete the old plugin and cvars config from your servers \cfg\sourcemod\ folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_achievement_trophy.sp - 2133 views - 13.6 KB)

    Last edited by Silvers; 03-28-2015 at 06:01.
    Silvers is offline
    Searcher64
    Senior Member
    Join Date: Apr 2010
    Old 08-23-2010 , 17:10   Re: [L4D & L4D2] Achievement Trophy
    Reply With Quote #2

    This....is....amazing......thank you.....
    Searcher64 is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-23-2010 , 17:14   Re: [L4D & L4D2] Achievement Trophy
    Reply With Quote #3

    Thanks, I can't take much credit. But it's something different and not done before.


    * Thanks to "L. Duke" for " TF2 Particles via TempEnts" tutorial
    http://forums.alliedmods.net/showthread.php?t=75102

    * Thanks to "Muridias" for updating "L. Duke"s code
    http://forums.alliedmods.net/showpos...6&postcount=28

    * Thanks to "panxiaohai" for "l4d_3rdnotbind_en" which is the ThirdPerson view
    http://forums.alliedmods.net/showpos...0&postcount=23



    Any bugs let me know, there shouldn't be any though it's quite simple.
    Silvers is offline
    Fleepster99
    Senior Member
    Join Date: Apr 2010
    Old 08-23-2010 , 17:30   Re: [L4D & L4D2] Achievement Trophy
    Reply With Quote #4

    Very fun plugin, and useful code 2 thanks.
    Fleepster99 is offline
    ldoh0112
    Member
    Join Date: Nov 2009
    Location: The Republic of Korea
    Old 08-24-2010 , 10:38   Re: [L4D & L4D2] Achievement Trophy
    Reply With Quote #5

    very good plugin, thank you
    ldoh0112 is offline
    dirka_dirka
    Veteran Member
    Join Date: Nov 2009
    Old 08-24-2010 , 12:54   Re: [L4D & L4D2] Achievement Trophy
    Reply With Quote #6

    why do you constantly hook the event? thats why it triggers more then 1ce a second.
    dirka_dirka is offline
    IronWarrior
    Veteran Member
    Join Date: Jan 2010
    Old 08-24-2010 , 13:27   Re: [L4D & L4D2] Achievement Trophy
    Reply With Quote #7

    Do players need to download anything?

    I don't see how that trophy is already in the game for it to be used?

    If this works as intended, then it's great.
    IronWarrior is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-24-2010 , 14:13   Re: [L4D & L4D2] Achievement Trophy
    Reply With Quote #8

    Quote:
    Originally Posted by dirka_dirka View Post
    why do you constantly hook the event? thats why it triggers more then 1ce a second.
    Well I only just started and following from examples, what is the correct place to hook? OnPluginStart? I was also considering for multipule achievements unlocked at once, usually end of a round though.



    Quote:
    Originally Posted by IronWarrior View Post
    Do players need to download anything?
    No, it's already within the pak files
    Silvers is offline
    McFlurry
    Veteran Member
    Join Date: Mar 2010
    Location: RemoveEdict(0);
    Old 08-24-2010 , 16:03   Re: [L4D & L4D2] Achievement Trophy
    Reply With Quote #9

    Yeah it works apparently they keep particles from previous games.
    Hook the event on OnPluginStart() or else it will fire 1 more time than the last each time the map changes.
    __________________
    McFlurry is offline
    Send a message via Skype™ to McFlurry
    dirka_dirka
    Veteran Member
    Join Date: Nov 2009
    Old 08-24-2010 , 23:15   Re: [L4D & L4D2] Achievement Trophy [24-Aug-2010 - v1.1.1]
    Reply With Quote #10

    yes one time in onpluginstart works.

    but since you have an enable cvar.. you could also toggle the hook when the plugin is enabled/disabled
    make a function Enabled() { // hook } and a function Disabled() { // unhook }
    then call those functions as the enabled cvar is changed
    dirka_dirka 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 02:27.


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