AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:GO] Flashlight (1.3.62) (https://forums.alliedmods.net/showthread.php?t=227224)

Mitchell 09-28-2013 17:38

[CS:GO] Flashlight (1.3.62)
 
1 Attachment(s)
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.

Dkmuniz 09-28-2013 20:52

Re: [CS:GO] Flashlight
 
Extremely good plugin, i really loved it, my friend "Baby" enjoyed it as well

Mitchell 09-30-2013 19:06

Re: [CS:GO] Flashlight
 
1.0.1 Released
Bacardi gave me some bit examples which i consider in this update, and replaced the check with just IsPlayerAlive().

cREANy0 09-30-2013 19:55

Re: [CS:GO] Flashlight
 
Nice Plugin!

hamilton5 09-30-2013 20:25

Re: [CS:GO] Flashlight
 
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

Blowst 09-30-2013 21:07

Re: [CS:GO] Flashlight
 
'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.

Bacardi 10-01-2013 06:15

Re: [CS:GO] Flashlight
 
Quote:

Originally Posted by Blowst (Post 2043477)
'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) :bee:
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
:wink:

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 :P

Dkmuniz 10-01-2013 12:25

Re: [CS:GO] Flashlight
 
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 .. = /

Mitchell 10-01-2013 13:58

Re: [CS:GO] Flashlight
 
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.

Mitchell 10-05-2013 11:33

Re: [CS:GO] Flashlight (1.3.0)
 
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!


All times are GMT -4. The time now is 01:03.

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