AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Custom Flashlight v0.5.4 (10/20/09) (https://forums.alliedmods.net/showthread.php?t=72143)

ConnorMcLeod 06-01-2008 06:50

Custom Flashlight v0.5.4 (10/20/09)
 
10 Attachment(s)
Custom Flashlight




.: Description :.

This plugin lets you customize flashlight with those features :
  • Set the drain frequency
  • Set the charge frequency
  • Choose the radius of flashlight
  • New! Unlimited flashlight (no drain)
  • New! Choose the color according to players team, or randomly
  • New! Show the flashlight to all players or only to the player who is using it (this can be usefull on kz servers)
  • New! Set a max distance after with the flashlight won't display
  • New! Set the light attenuation according to distance
  • New! Set flashlight sounds
  • Supports simon logic Blinding Flashlight plugin



.: Commands :.

  • flashlight_set custom < 0|1 >
    Turn the plugin on/off
  • flashlight_set show < 0|1 >
    Show flashlight to all players or only to the player who is using it
  • flashlight_set drain < value > default cs value is 120
    Time in seconds it will take to flashlight to be fully drained
  • flashlight_set charge < value > default cs value is 20
    Time in seconds it will take to flashlight to be fully charged
  • flashlight_set colortype < 0|1 >
    0:random (predifined) colors
    1:team colors
  • flashlight_set colorct < RRRGGGBBB >
    Flashlight color for CTs if flashlight_color_type is set to 1
  • flashlight_set colorte < RRRGGGBBB >
    Flashlight color for Ts if flashlight_color_type is set to 1
  • flashlight_set radius < 0-255 >
    Flashlight radius :P
  • flashlight_set distance < value >
    Max distance in units where you can see the flashlight
  • flashlight_set attenuation < value >
    Attenuation light factor according to distance between player and flashlight



.: Modules/Requirements :.

  • AMXX1.8+
  • Engine
  • $CONFIGSDIR/flashlight_colors.ini (see attachment)
    (plugin will automatically use per team colors if this file doesn't exist)


.: Credits :.


XxAvalanchexX for the previous plugin version witch gave me this idea and in witch i took the TE_DLIGHT message
HLSDK
Salamon for some ideas



.: Colors examples :.


http://en.wikipedia.org/wiki/List_of_colors



.: Config example :.


Put this code in amxx.cfg (or maps/de_dust2.cfg, maps/prefix_de.cfg etc..) -> default amxx .cfg files system.
Code:

// Custom Flashlight Settings
flashlight_set custom 1
flashlight_set show 1

flashlight_set drain 120
flashlight_set charge 20

flashlight_set colortype 0
flashlight_set colorte 255000000
flashlight_set colorct 000000255

flashlight_set radius 9
flashlight_set distance 2000
flashlight_set attenuation 5

To use per maps .ini file, do as for per maps plugins.ini file but instead of using maps/ folder, use flashlight/ one.
Examples :
Code:

addons\amxmodx\configs\flashlight\de_dust.ini
addons\amxmodx\configs\flashlight\prefix_cs.ini

.: Changelog :.
Code:

* v0.5.4 (10.20.09)
* attempt to fix the bug when you can re-activate fl when empty
*
* v0.5.3 (09/01/09)
* -fixed little errors due to version change
* -added player range check in death event
** v0.5.2 (07/23/09)
* -fixed inverted teams colors
*
* v0.5.1 (04/04/09)
* -haven't realised i can remove FM include
*
* v0.5.0 (04/03/09)
* - use register_think instead of FM_CmdStart
* - use client_PreThink instead of FM_PlayerPreThink
* - use get_user_origin mode 1 and 3 instead of fakemeta stock
* - replaced some FM natives+enums with amxx natives (emit_sound, write_coord)
*
* v0.4.0 (07/27/08)
* - replaced cvars with commands
* - .ini file now supports prefix/per map configs
*
* v0.3.1 (06/29/08)
* - fixed bug when you could have seen normal flashlight
*
* v0.3.0 (06/21/08)
*
* - some code optimizations (thanks to simon logic and jim_yang)
* - changes cvars flashlight_drainfreq and flashlight_chargefreq to
*  flashlight_fulldrain_time and flashlight_fullcharge_time
*  (simon logic suggestion)
* - moved random colors into $CONFIGSDIR/flashlight_colors.ini
*
* v0.2.0
* First public release


Alka 06-01-2008 06:59

Re: Custom Flashlight (New)
 
Just tested, and works great! Gj :mrgreen:

Fry! 06-01-2008 08:38

Re: Custom Flashlight (New)
 
wow , something new . =)

Fan of Da!!! 06-01-2008 09:28

Re: Custom Flashlight (New)
 
Will this work with zombie infection ? :)

Fry! 06-01-2008 09:45

Re: Custom Flashlight (New)
 
Why You don't try ?

Fan of Da!!! 06-01-2008 10:20

Re: Custom Flashlight (New)
 
Because i have Sparta mod server the plugin is for one friend :D

ConnorMcLeod 06-01-2008 10:31

Re: Custom Flashlight (New)
 
Quote:

Originally Posted by Fan of Da!!! (Post 633065)
Will this work with zombie infection ? :)

Should work.

Zul Rivers 06-04-2008 04:13

Re: Custom Flashlight (New)
 
Good Job, this plugin doesn't seem to lag me in my server.

ConnorMcLeod 06-04-2008 12:34

Re: Custom Flashlight (New)
 
Players can have low fps if you set radius too high.

AntiBots 06-04-2008 13:03

Re: Custom Flashlight (New)
 
I donīt have any problem with FPS.


All times are GMT -4. The time now is 12:56.

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