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

[CS:GO] Flashlight (1.3.62)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mitchell
~lick~
Join Date: Mar 2010
Plugin ID:
3925
Plugin Version:
1.3.63
Plugin Category:
All
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
    7 
    Plugin Description:
    Replaces +lookatweapon with a toggleable flashlight. Also adds the command: sm_flashlight
    Old 09-28-2013 , 17:38   [CS:GO] Flashlight (1.3.62)
    Reply With Quote #1

    CS:GO Flashlight.
    Description:
    Since valve technically removed it for some stupid command to look at your gun skin, server owners can put this on their server to replace that command with a flashlight.

    Commands:
    sm_flashlight: (bind t sm_flashlight) this is a secondary command for player to bind.

    Convars:
    A config is made also in cfg/sourcemod/ folder.
    sm_flashlight_lookatweapon: (def 1) disables the hook of +lookatweapon.
    sm_flashlight_return: (def 0) determines whether to ignore the command completely or to continue the command.
    sm_flashlight_sound: (def "items/flashlight1.wav") The sound the flashlight makes when toggled (default included)
    sm_flashlight_sound_all: (def 1) Will the sound be played to all players?

    Convar: (cont)
    1. If you want to have the +lookatweapon to still work and not turn on flashlight, and just have the command: sm_flashlight, set the following cvars to these values: (no need to set return to anything cause the cvar is skipped due to the fact lookatweapon cvar is checked first in the hook.
    Code:
    sm_flashlight_lookatweapon 0
    2. If you want to have +lookatweapon still look at the weapon and turn on the flashlight use this config:
    Code:
    sm_flashlight_lookatweapon 1
    sm_flashlight_return 1
    3. The third option is my favorite cause it replaces a command i never use (+lookatweapon) which is the default variables. Uses this config.
    Code:
    sm_flashlight_lookatweapon 1
    sm_flashlight_return 0
    Version Notes:
    1.3.63: Fixed the convar hook of Sound All.
    1.3.62: Custom sounds are now fixed and downloaded correctly. (479 downloads)
    1.3.6: Sounds are now fixed and properly precached and played. Also added the sm_flashlight_sound_all ConVar. (2.7k Downloads)
    1.3.5: Custom flashlight sounds are now automatically added to download table (2.2k Downloads since 2013, Wow!)
    1.3.4: Removed the required emitany include.
    1.3.3: Added Sound
    1.3.2: Added Enabled Cvar (958 downloads from last update)
    1.3.1: Added to check if the player is in the current gaming session to avoid errors.
    1.3.0: Adjusted code to be more clean, and added comments.
    1.2.0: Added a cvar to enable the return, also a cvar to disable the +lookatweapon hook. and the cvar sm_flashlight
    1.1.0: Bacardi gave me some bit examples which i consider in this update, and replaced the check with just IsPlayerAlive().
    1.0.0: initial release.
    Attached Files
    File Type: sp Get Plugin or Get Source (CsGoFlashlight.sp - 9516 views - 3.9 KB)

    Last edited by Mitchell; 05-27-2016 at 11:33. Reason: Updated to 1.3.62
    Mitchell is offline
    Dkmuniz
    Senior Member
    Join Date: Jun 2013
    Old 09-28-2013 , 20:52   Re: [CS:GO] Flashlight
    Reply With Quote #2

    Extremely good plugin, i really loved it, my friend "Baby" enjoyed it as well

    Last edited by Dkmuniz; 09-28-2013 at 20:58.
    Dkmuniz is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 09-30-2013 , 19:06   Re: [CS:GO] Flashlight
    Reply With Quote #3

    1.0.1 Released
    Bacardi gave me some bit examples which i consider in this update, and replaced the check with just IsPlayerAlive().
    Mitchell is offline
    cREANy0
    SourceMod Donor
    Join Date: Jul 2012
    Location: Germany
    Old 09-30-2013 , 19:55   Re: [CS:GO] Flashlight
    Reply With Quote #4

    Nice Plugin!
    __________________
    cREANy0 is offline
    hamilton5
    Veteran Member
    Join Date: Oct 2012
    Location: USA
    Old 09-30-2013 , 20:25   Re: [CS:GO] Flashlight
    Reply With Quote #5

    so now only flashlight, a player can't look at their weapon
    I don't think removing a feature for another is good, tell users to bind another key to impulse 100

    Last edited by hamilton5; 09-30-2013 at 20:26.
    hamilton5 is offline
    Blowst
    Senior Member
    Join Date: Feb 2011
    Location: Korea, Republic of
    Old 09-30-2013 , 21:07   Re: [CS:GO] Flashlight
    Reply With Quote #6

    'impulse 100' may also be used to 'lookatweapon' command when mp_flashlight is 0

    I guess that impulse 100 controls both toggle flashlight and lookatweapon depend upon value of mp_flashlight.
    __________________
    Sorry about my poor English


    Last edited by Blowst; 10-01-2013 at 06:25.
    Blowst is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 10-01-2013 , 06:15   Re: [CS:GO] Flashlight
    Reply With Quote #7

    Quote:
    Originally Posted by Blowst View Post
    'impulse 100' may also be used to 'lookupweapon' command when mp_flashlight is 0

    I guess that impulse 100 controls both toggle flashlight and lookupweapon depend upon value of mp_flashlight.
    Ok, I went to the mess after those tests. (Nice rhyme)
    I gave false info also for Mitchell via PM..

    This how cs:go flashlight work:
    sm_cvar mp_flashlight 0
    And "impulse 100" command works same as "+lookatweapon" "look my calluses"

    sm_cvar mp_flashlight 1
    Command "impulse 100" works like normal flashlight without "+lookatweapon" "look my calluses" feature


    I rest my case

    *edit
    Mitchell plugin would help to avoid players to bind they flashlight button back (and not need even set mp_flashlight 1 on server).
    Mitchell will (maybe) add a new cvar, should it block "+lookatweapon" totally or not

    Last edited by Bacardi; 10-01-2013 at 06:31. Reason: aaah
    Bacardi is offline
    Dkmuniz
    Senior Member
    Join Date: Jun 2013
    Old 10-01-2013 , 12:25   Re: [CS:GO] Flashlight
    Reply With Quote #8

    have how to put to work only with the letter f, type bind f "impulse 100" because the "+ lookatweapon" is very nice for server also .. = /
    Dkmuniz is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 10-01-2013 , 13:58   Re: [CS:GO] Flashlight
    Reply With Quote #9

    Later on today i will release a cvar that can be set to 0 to not block the command, and will turn on the flashlight too.
    I just need to test it.

    Last edited by Mitchell; 10-01-2013 at 14:04.
    Mitchell is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 10-05-2013 , 11:33   Re: [CS:GO] Flashlight (1.3.0)
    Reply With Quote #10

    Update 1.3.0:
    Adjusted and fixed some code to be more readable, and simpliefed most of it and readded spaces to increase readability

    Any suggestions please feel free to post here, and ill consider them!
    Mitchell 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 20:17.


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