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

Flares - v1.5 - Updated 05-19-2009


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff        Approver:   Orangutanz (13)
Texnux
Member
Join Date: Mar 2008
Location: Denmark
Old 04-16-2008 , 12:48   Flares - v1.5 - Updated 05-19-2009
Reply With Quote #1

Flares - v1.5.0, by Texnux - Updated on 05-19-2009

Works for:
This plugin works for every mod! There are 3 versions:

- Read compiling options for more information!

Description:
This plugin allows players to fire a flare! It got 7 modes!

The modes are as so for the colors:
0 = off
1 = white
2 = red
3 = green
4 = blue
5 = server defined
6 = random
7 = timely random

Commands:
amx_flare_mode - turns the plugin off and between mode 1 to 7 - ADMIN_KICK level required.

Console commands:
fireflare - fire a flare!
buyflare - buy a flare!
flarehelp - Shows a MOTD help window!

Chat commands:
/buyflare - buy a flare!
/fireflare - fire a flare!
/flarehelp - Shows a MOTD help window!

Cvars:
- flare_mode - (default = 1) - Which mode to use (0 = off, 1 = free, 2 = cost, 3 = replaces grenades)
- flare_color_mode - (default = 1) - Which color mode the flare will use.
- flare_server_limit_active - (default = 25) - How many flares can be active at a time in total.
- flare_server_limit_owned - (default = 100) - How many flares can be owned at a time in total.
- flare_colors - (default = 000255255) - Color for the server determind color mode.
- flare_user_max_own - (default = 2) - How many flares a player can hold.
- flare_user_max_active - (default = 2) - How many flares that can be active for one player.
- flare_update_light - (default = 0.1) - How fast the color refresh.
- flare_update_color - (default = 0.5) - How often the flare changes color if mode is randomly color change.
- flare_light_life - (default = 1) - The life of the light, in 1/10 sec.
- flare_lifespan - (default = 10.0) - The lifespan for the flare.
- flare_stay - (default = 3.0) - How long time the flare stays when its dead.
- flare_dying - (default = 20) - How fast the color retreats when the flare is dead, in 1/10 sec.
- flare_decay - (default = 1) - The time before the light retreats, in 1/10 sec.
- flare_radius - (default = 25) - The radius of the light.
- flare_throw - (default = 500) - How fast you throw it.
- flare_start_with - (default = 0) - How many flares to start with each (re)spawn.
- flare_admin_rights - (default = 0) - Admins only or not.
- flare_user_acquire - (default = 0) - Can you get new flares or not by buying/getting them with buy command.
- flare_user_dead_bypass - (default = 0) - Can you buy and fire flare while being dead (overrides flare_user_keep_on_dying).
- flare_user_keep_on_dying - (default = 0) - keep flares when you die.
- flare_server_advertise_status - (default = 1) - Advertisment use.
- flare_server_advertise_time - (default = 180.0) - How often do the server advertise the flares.

Cvars for CS/CZ only:
- flare_buyzone (default 1) = Obey buy zone.
- flare_buytime (default 1) = Obey buy time.
- flare_replace_mode - (default = 4) - Which grenades to replace (1-7) (1 = hegrenade, 2 = flashbang, 4 = smokegrenade, add them to each other to get all the grenades, example 5 = hegrenade and smokegrenade).

Required Modules:
- Cstrike - Only for CS/CZ version
- Fakemeta
- Hamsandwich

Compiling options:
In version 1.5.0 I introduced a method that removes the annoying splitting process of the plugin to run on both CS/CZ and all other mods.

#define TYPE 0
TYPE compiling options explaning:
0 = With everything (Some features runs only in CS/CZ)
1 = For any mod without CS/CZ features added
2 = For CS/CZ with the added features

- Added features, that only works for CS/CZ, are: buyzone, buytime, replacing.

#define DEBUG 0 // 0 = No debugging tools, 1 = Debugging tools available (deletes and recreates a new multi language file on each map start)

If you set DEBUG to 1 then a command can be used by everyone to help finding bugs in the plugin by showing a hud with all the plugins settings.

Command for the hud:
amx_flare_debug - first time activates it and second deactivates it for the user.

#define UPDATELIST 1 // 0 = No error/request commands, 1 = You can use a command to report to the server a request or bug description for the plugin flares.

By using the following commands, you can log your request and/or bug you find to the server's log file for the plugin.

Commands:
amx_flare_request description of request - used for submitting a request to the server regarding the Flares.amx_flare_bug description of bug - used for submitting a bug report to the server regarding the Flares.

Cvars:
flare_updatelist_status - (default = 1) - 1 = both commands can be used, 0 = they can't.
flare_updatelist_adminrights - (default = 1) - Only admin can use the commands for bug report and request.

Known Bugs:
- None I know of (yet).

Screenshots:
[IMG]http://img293.**************/img293/9678/csmilitiacz0031wj1.th.png[/IMG][IMG]http://img293.**************/img293/6619/csmilitiacz0013bk2.th.png[/IMG]

Credits:
Calzinger - For his old flare plugin.
Tirant_Flare - For the hand model of a flare.
Geesu - For compiling options and avoid plugin halt by needing a module (from warcarft 3ft plugin)
Avalanche - For his gungame plugin, used some of his MOTD system.

Changelog:
Code:
Version 1.0.0
- Initial release.
 
Version 1.0.1
- Changed cvars to pcvars.
 
Version 1.1.0
- Runs on every mod now! 
 
Version 1.2.0
- Seperated the plugin to two files so it can be used with all mods!
- Small bugs fixed.
- Added buyzone and buytime to cs/cs version.
 
Version 1.3.0 - Cstrike only for now
- Using TE_DLIGHT instead of a number
- Changed cvar flare_life to flare_lifelight to simplify things with the cvar flare_lifespan
- Possibility to replace smoke grenades with flares
- Possibility to set the amount of flares players get when they spawn
- Prevent players from buying when they are given flares
- Cvars added: flare_replace, flare_allow_buying, flare_give
 
Version 1.4.0
- Plugin splitted in to three: anymod, cstrike/czero, cstrike/czero that can replace a grenade
- Fixed admin only bug that made it even impossible for admins to use
- Added multi language support
- Rewrote most of the plugin
- Change/Add cvars - look at the cvar list
- All functions is now fakemeta instead of engine
- Released for: anymod
 
Version 1.5.0
- Name change from Flare to Flares.
- Auto creation of multi-language file.
- Far better Multi-Language system.
- Usement sytem (off, free, cost, replacing).
- Replacing system (he, flash and smoke with flag system).
- Holding a flare in hand in first person view.
- Added server max owned and active flares for performance wise.
- Fixed buytime, were incredible buggy.
- Change some cvar names.
- Added dead bypass for wierdness.
- A Commercial.
- MOTD help system.
- Compiling options for plugin to run on all HL1 mods instead of multiple files.
- Compiling with debug mode for players to debug (bug test) the plugin.
- Compiling with request and bug submit possibilities.
- Cleaned some code.
- Fixed alot of bugs.
- Rewrote some parts of the code.
- Command fireflare changed to igniteflare same for say /fireflare version.
To do list:
Code:
- Heavy bug test and bug fixes if found
- MOTD, expand with all settings into it or in a menu
- Menu system for ignite player choosen flare color
- Menu system with server preset colors from a ini file
- Admin menu for controlling settings for flares
- Extra: Light settings changing without using an extra plugin
- A new mode which fires a flare with a random mode
- Config file with description of all cvars
- Change cvars names to give more sense
- Organize/Optimize code even better
Accepting user requests!

Recommended:
You can download the plugin compiled, but if you were going to only use it for any mod buy CS/CZ you would get unnessersary things you can't use anyways, therefore download the .sma file and compile it locally after changing the compiling options in the top of the file.

If you don't use it for CS/CZ then there won't be any reasons to download the hand model of the flare.

Since alot of people don't download the language file its created by default now, so only download the language file if you want to submit a translation.

Installation guide:
The zip folder Flares.zip is ready to be unpacked into the mod you want to use the plugin with.

Flares.sma is set up to be compiled with all options but debug tools.

Flares.txt is the multi-language file, though it is created automatically, so no need to download it for anything but translating it.

The zip folder HandModel.zip is the hand model of a flare for CS/CZ version of the plugin.



- Texnux
Attached Files
File Type: zip Flares.zip (134.8 KB, 2146 views)
File Type: sma Get Plugin or Get Source (Flares.sma - 3254 views - 36.4 KB)
File Type: txt Flares.txt (2.2 KB, 1163 views)
File Type: zip HandModel.zip (94.6 KB, 1553 views)

Last edited by Texnux; 05-19-2009 at 17:18.
Texnux is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-16-2008 , 13:03   Re: Flare
Reply With Quote #2

Use pcvars.
__________________
Arkshine is offline
Texnux
Member
Join Date: Mar 2008
Location: Denmark
Old 04-16-2008 , 13:08   Re: Flare
Reply With Quote #3

Quote:
Originally Posted by arkshine View Post
Use pcvars.
And the reason for that would be?
Texnux is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 04-16-2008 , 13:14   Re: Flare
Reply With Quote #4

pcvars are faster.. Its a direct pointer so they dont have to search through all cvars to get the pointer

Oh and you need them to get your plugin approved
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 04-16-2008 , 13:20   Re: Flare
Reply With Quote #5

Does this work on CS1.6 or only CZ?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Texnux
Member
Join Date: Mar 2008
Location: Denmark
Old 04-16-2008 , 13:21   Re: Flare
Reply With Quote #6

Quote:
Originally Posted by P34nut View Post
pcvars are faster.. Its a direct pointer so they dont have to search through all cvars to get the pointer

Oh and you need them to get your plugin approved
Oh well i must have missed that

Gonna update it then
Texnux is offline
RAKISHI
Member
Join Date: Jul 2006
Old 04-16-2008 , 13:23   Re: Flare
Reply With Quote #7

Can you make it to be for Counter Strike 1.6 two?
RAKISHI is offline
Texnux
Member
Join Date: Mar 2008
Location: Denmark
Old 04-16-2008 , 13:57   Re: Flare
Reply With Quote #8

Quote:
Originally Posted by YamiKaitou View Post
Does this work on CS1.6 or only CZ?
Quote:
Originally Posted by RAKISHI View Post
Can you make it to be for Counter Strike 1.6 two?
It does work for CS 1.6.

- Texnux
Texnux is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 04-16-2008 , 15:38   Re: Flare
Reply With Quote #9

Quote:
Originally Posted by Texnux View Post
It does work for CS 1.6.

- Texnux
Then I would suggest changing the mod to Counter-Strike instead of Condition Zero. Or, you might get more of these questions later
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Old 04-17-2008, 23:40
purple nurple
This message has been deleted by purple nurple.
Texnux
Member
Join Date: Mar 2008
Location: Denmark
Old 04-18-2008 , 03:37   Re: Flare
Reply With Quote #10

Quote:
Originally Posted by purple nurple View Post
Here is version 1.0.1 and it should work on most half life 1 mods.
And why would you make it like that huh? You only removed the part where you have to buy the flare FOR money, now it is free! You didn't even change the text! If you want it to be for all mods make a request or atleast make it right!

- Texnux

EDIT 1

I have updated the plugin to allow every mod now!

- Texnux

Last edited by Texnux; 04-18-2008 at 12:42.
Texnux is offline
Reply



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 01:27.


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