Thread: [Plugin] Simple glow

Page 1 of 2 12 LastLast
Results 1 to 25 of 43

Hybrid View

  1. #1
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    195

    Post [Plugin] Simple glow

    Simple glow plugin for angelscript :P

    Cvars:
    • hidechat 0/1 - Hide player chat when executing glow command
    • silence 0/1 - Silent plugin - only print to user instead of everybody

    (to change cvars either write this in console or write it in your server.cfg: as_command sglow.hidechat 0/1 or as_command sglow.silence 0/1)

    Usage:
    • say glow off - turns glow off
    • say glow <color> - turns glow on
    • say glow menu - show glow menu


    Default color list:
    • red
    • orange
    • yellow
    • lime
    • green
    • turquoise
    • cyan
    • blue
    • purple
    • pink
    • white


    Adding custom colors:
    Open up /scripts/plugins/Zode/colors.txt and add your colors there.

    Installation:
    Remove any previous installation of SimpleGlow
    Download & extract SimpleGlow.zip to /Sven Co-op/svencoop_addons/scripts/plugins/
    edit your default_plugins.txt and add (or modify if you have previous installation) this in:
    Code:
    "plugin"
    {
            "name" "SimpleGlow"
            "script" "Zode/SimpleGlow"
            "concommandns" "sglow"
    }
    type as_reloadplugins in your server console


    Enjoy!

    Download: -removed, see attachment-
    Attached Files Attached Files
    Last edited by Zodemon; 08-11-2016 at 12:05 PM.

  2. #2
    ROTFLTYTACITH Agent Pingwin's Avatar
    Join Date
    Jul 2002
    Location
    Where you live
    Posts
    1,091

    Thumbs up Re: [Plugin] Simple glow

    Good work. In my personal opinion all the goto plugins for server hosts should be run through the default "admin mod" (ie: angel script) that comes factory with the offical release as to create a more streamlined service for future server hosts. I see this as a step forward in terms of the direction modern sven is heading and I appreciate it.


  3. #3
    Registered User recon224's Avatar
    Join Date
    Jan 2016
    Location
    Illinois, United States
    Posts
    70

    Re: [Plugin] Simple glow

    Quote Originally Posted by Agent Pingwin View Post
    Good work. In my personal opinion all the goto plugins for server hosts should be run through the default "admin mod" (ie: angel script) that comes factory with the offical release as to create a more streamlined service for future server hosts. I see this as a step forward in terms of the direction modern sven is heading and I appreciate it.
    I agree! I have always used AMXX/MP but the unreliability of them both has caused me to keep my server running AS and nothing else. Because of this, I have trying to learn how each plugin works while also trying to briefly understand C++. Should be interesting to see how others react as time goes by.

  4. #4

  5. #5
    Registered User recon224's Avatar
    Join Date
    Jan 2016
    Location
    Illinois, United States
    Posts
    70

    Re: [Plugin] Simple glow

    Quote Originally Posted by The303 View Post
    Love it!

    Does this affect the dynamic lighting at all? I ask this only because I wouldn't want to add any unnecessary lag for players that are already having fps problems with the flashlight ordeal.

  6. #6
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    195

    Re: [Plugin] Simple glow

    no, it doesnt have anything to do with dynamic lighting :P

  7. #7
    incognico nico's Avatar
    Join Date
    Aug 2015
    Posts
    437

    Re: [Plugin] Simple glow

    Cool, I will replace the amxx glow plug in I am using with that one, even if the amxx one has some more features (up to 3 color glow).

  8. #8
    Banned Solokiller's Avatar
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    3,314

    Re: [Plugin] Simple glow

    Note that players will lose glow settings on respawn. If you want the glow to persist, you'll have to store off the settings somewhere and hook PlayerSpawn so you can apply the settings again.

  9. #9
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    195

    Re: [Plugin] Simple glow

    i knew i forgot something hah
    oh well i already fixed that, so if anyone installed this plugin you will have to redownload it lo

  10. #10
    Registered User
    Join Date
    Jan 2016
    Posts
    6

    Re: [Plugin] Simple glow

    I noticed it sometimes lose the effect on weapon pickup/drop.
    Last edited by rk.; 26-01-2016 at 06:14 AM.

  11. #11
    Banned Solokiller's Avatar
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    3,314

    Re: [Plugin] Simple glow

    The reason for that is that our new effects handling code will apply its settings to the player whenever any effect changes. If you pick up a minigun, the speed altering effect is applied, along with all other effects.
    item_inventory's glow settings and other effects will also trigger it. If you really want to keep the glow effect, you'll have to reapply it fairly often.

  12. #12
    Registered User
    Join Date
    Jan 2016
    Posts
    23

    Re: [Plugin] Simple glow

    Why don't you add a hook for it? Like Hooks::Player::EffectsUpdate or Hooks::Player::EffectsChanged?
    Or will you change your effects system so it only affects the effect that has been changed, not all of them?

  13. #13
    Banned Solokiller's Avatar
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    3,314

    Re: [Plugin] Simple glow

    The plan is to only have effects be applied if they were changed by something, and to revert those changes only if they were applied to begin with.

  14. #14
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    195

    Re: [Plugin] Simple glow

    ehh i might have that fixed once i add in basic animation (so players can go like: glow red green blue to enable cycling through colors)

  15. #15
    incognico nico's Avatar
    Join Date
    Aug 2015
    Posts
    437

    Re: [Plugin] Simple glow

    Suggestion: Also get rid of the if, elsif, make that dynamic with a hash/table of color name and color codes. Maybe even in a file so we don't have to edit the script itself when adding custom colors. But the question is if that still counts as "simple" :P

  16. #16
    warrior spy-warrior's Avatar  
    Contributor
    Join Date
    Nov 2006
    Location
    Europe, France, Paris
    Posts
    2,927

    Re: [Plugin] Simple glow

    Suggestion:
    add options: disable the view to client for screenshot
    glow_view 1/0 endable/disable
    add options: the administrator, choose the color automatically by default.
    endable glow automatically all player

  17. #17
    Banned Solokiller's Avatar
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    3,314

    Re: [Plugin] Simple glow

    That's not too difficult to do. Use the CFG parser utilities to simplify the loading of the file.

  18. #18
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    195

    Re: [Plugin] Simple glow

    i blame switches not supporting strings :--D but yeah i could look into that too

  19. #19
    Registered User recon224's Avatar
    Join Date
    Jan 2016
    Location
    Illinois, United States
    Posts
    70

    Re: [Plugin] Simple glow

    Any chance to have the effects survive map changes? Obviously this information would have to be stored somewhere temporarily but have no idea where or how.

  20. #20
    Registered User
    Join Date
    Jan 2016
    Posts
    23

    Re: [Plugin] Simple glow

    Quote Originally Posted by recon224 View Post
    Any chance to have the effects survive map changes? Obviously this information would have to be stored somewhere temporarily but have no idea where or how.
    Read this topic: http://forums.svencoop.com/showthrea...or-write-(Cfg). AngelScript is able to create temp files, perfect for what you are looking for.

  21. #21
    Banned Solokiller's Avatar
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    3,314

    Re: [Plugin] Simple glow

    Plugins stay loaded even if the map changes. Just don't clear the data and it's fine.

  22. #22
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    195

    Re: [Plugin] Simple glow

    quick patch:
    > updated code to fix changes in angelscript
    Last edited by Zodemon; 30-01-2016 at 05:04 AM.

  23. #23
    The Main Man BloodShed's Avatar
    Join Date
    Sep 2002
    Location
    Denmark
    Posts
    958

    Re: [Plugin] Simple glow

    Will you be adding more colors or special variants like police (cycle red and blue)?
    Gamer by heart. Gaming by skill.

  24. #24
    Banned Solokiller's Avatar
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    3,314

    Re: [Plugin] Simple glow

    By the way, you can refactor your massive if else chain pretty easily:

    Code:
    const dictionary g_Colors = { { "red", Vector( 255, 0, 0 ) } };
    Expand as needed. Use function pointers for color specific behavior.

  25. #25
    Advanced Leveldesigner SourceSkyBoxer's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    785

    Re: [Plugin] Simple glow

    And i want orange color :P because my favorite color.... Thanks!
    Hello guys, Svencoop. I am sorry Please respect me! I am deaf. Thanks, Sven-Coop Forum!

    Please do not share to shit dropbox! Please share only Mega.nz!
    Muhahaha, Facebook crashed!

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •