View Full Version : DoD Force Tracers (v1.0)
diamond-optic
07-22-2006, 01:54 AM
DoD Force Tracers
- Version 1.0
- 04.06.2008
- diamond-optic
Credits:
- Wilson [29th ID] for the new method of locking the cmds
- Zor, teame06, and the others from #amxmodx that helped me
Information:
- Force all clients to use your tracer settings
CVARs & Commands:
dod_forcetracers //Turn on(1)/off(0) forcing of tracer settings
dod_reloadtracers //Manually force tracer settings to clients (use after making changes ingame, OLD_METHOD define must be 1)
//
//These control what values are set to the client:
dod_traceralpha "0.35"
dod_tracerblue "2.50"
dod_tracergreen "0.5"
dod_tracerlength "1.5"
dod_traceroffset "10"
dod_tracerred "0.5"
dod_tracerspeed "1000"
Extra:
Change OLD_METHOD define:
0 = new method (more effecient)
1 = old method (allow on the fly changing)
Version Info:
- 12.19.2005 Version 0.0a
actually got it to work lol...
fixed testing bugs
- 12.21.2005 Version 0.0b
added cvar "dod_forcetracers"
removed extra testing code
- 12.25.2005 Version 0.1
added cvar's for each tracer setting
removed client_print lines
- 01.11.2006 Version 0.2
catches respawn to reforce settings
- 03.05.2006 Version 0.3
updated to 1.70 CVAR pointers
- 03.15.2006 Version 0.4
added dod_reloadtracers to manually force tracer settings
- 04.18.2006 Version 0.5
dont bother if they're not connected or bots
- 06.07.2006 Version 0.6
fixed some mistakes with the return values
- 07.24.2006 Version 0.6b
cleaned up code a bit
- 08.28.2006 Version 0.7
much better way of locking cmds (thanks Wilson [29th ID])
added OLD_METHOD define for selecting method of setting tracers
changed some returns
- 04.06.2008 Version 1.0
Code Improvements
DOWNLOAD MIRROR: http://www.avamods.com/download.php?view.42
diamond-optic
07-24-2006, 11:32 PM
meaningless update, but i want mark it as up to date on my hd...
- 07.24.2006 Version 0.6b
cleaned up code a bit
Morimoto
08-15-2006, 05:17 PM
forgive me, but why would u want to force players to use your tracer settings?
diamond-optic
08-15-2006, 10:27 PM
becuase then you can make everyone see the same tracers.. like for example you can set it so that tracers are whatever color you want, move at whatever speed you want.. and are as long as you want..
just a little something to give you that extra bit of control on your server
=|[76AD]|= TatsuSaisei
08-15-2006, 10:36 PM
another reason is this... players can turn tracers to whatever they want (without a plugin like this in effect) and could make them so colorful and long that it becomes very easy to pinpoint the mgs location.... if everyone was forced to have the same tracer setting then that specific advantage is gone... making for a much more balanced game.. while also giving your server that custom feel....
Wilson [29th ID]
08-16-2006, 04:18 AM
Oh jeeze I just now looked at your code; there's a much easier way of doing this. Right now, you have a loop that sets the clients tracers to whatever you desire every 5.0 "seconds" Theoretically, this way, a client could press a button to set them back to normal every time this happens. I know this isn't something someone would actually do but regardless the loop itself, in theory, takes processing power.
Check this out.
public plugin_init() {
register_concmd("blockcmd", "block_cmd")
register_cvar("blocktracers", "1")
// Register cvars for tracer colours here
}
public client_connect(id) {
if(get_cvar_num("blocktracers")) {
FuncBlockTracers(id)
}
}
stock FuncBlockTracers(id) {
// Sets desired "traceralpha"
client_cmd(id,"traceralpha %f",get_pcvar_float(p_dod_traceralpha))
// Blocks client from adjusting "traceralpha" until they restart dod
client_cmd(id,"alias traceralpha blockcmd")
// Do the same for the rest of them
}
public block_cmd(id) {
client_print(id, print_console, "Command Blocked")
return PLUGIN_HANDLED
}
Basically, it's setting the desired client commands, then rerouting the command itself to "blockcmd," which does nothing but print "Command Blocked" in the client's console.
Once the client restarts dod, the command will be rerouted back to its normal function (unless of course he enters your server again in which case it will be re-re-rerouted back to "blockcmd" :-P
diamond-optic
08-16-2006, 11:09 AM
hmm i thought i tried that when i 1st made it and it didnt work.. maybe i messed it up..
ill give it a try when i get home from work if i get a chance.. tho not sure if im gonna be around.. i leave for a 4 day music festival and wont be back to sunday/monday
=|[76AD]|= TatsuSaisei
08-16-2006, 11:20 AM
i leave for a 4 day music festival and wont be back to sunday/monday
which festival would that be ??
diamond-optic
08-16-2006, 11:28 AM
http://www.gatheringofthevibes.com/
and im gonna try and catch a ride from there out to PA, somewhere a little north of pittsburgh for stevie guitar miller :-P
=|[76AD]|= TatsuSaisei
08-16-2006, 11:36 AM
http://www.gatheringofthevibes.com/
and im gonna try and catch a ride from there out to PA, somewhere a little north of pittsburgh for stevie guitar miller :-P
awesome, I havnt been able to go out since my kids were born... I used to do the Phish thing with friends... (was not much of a Phish fan, but I LOVED the people, and I love to party)
diamond-optic
08-16-2006, 10:35 PM
heh since this is my thread, going off-topic with this subject matter is fine with me..
i miss phish lol.. nothing like those shows.. well maybe if i had seen the grateful dead i would say something different.. lol.. i saw GRAB (Mike Gordon, Joe Russo, Trey Anastasio, and Marco Benevento) which was great.. they opened for phil lesh & friends.. which i was an alright show.. got better when trey played with them..
diamond-optic
08-22-2006, 03:54 PM
hey wilson that doesnt seem to work..
i can still change the values and i dont get the command blocked print out either :-(
but i manually put the alias in my console.. it blocks it then.. so it seems like amxx isnt setting the alias on the client
*edit*
its giving me this for each one:
Server tried to send invalid command:"alias tracerblue blockcmd"
then on amxmodx's irc channel:
<@Basic-Master> you can't register aliases using client_cmd
Wilson [29th ID]
08-22-2006, 06:30 PM
No - you definitely can do it it has worked for me before. I learned it from FURAX44's code - check this out and you can see what's going on. This works.
#include <amxmodx>
new g_BlockCheck[33]
new g_BlockIcon
public plugin_init() {
register_plugin("RealismGuard","0.0.2","FURAX44 & Cpt.Wilson")
register_cvar("realism_guard","0")
register_clcmd("block_identiconmode","Used_identiconmode",0,"- Icon Identification & HUD is blocked by server")
}
public plugin_cfg()
{
g_BlockIcon = get_cvar_num("realism_guard")
}
public client_connect(id){
if (g_BlockIcon==1) BlockIconOnClient(id)
}
stock BlockIconOnClient(id)
{
g_BlockCheck[id] = 1
client_cmd(id,"cl_identiconmode 0;alias cl_identiconmode block_identiconmode;cl_hud_health 0;alias cl_hud_health block_identiconmode;cl_hud_ammo 0;alias cl_hud_ammo block_identiconmode;cl_hud_objtimer 0;alias cl_hud_objtimer block_identiconmode;cl_hud_reinforcements 0;alias cl_hud_reinforcements block_identiconmode;cl_dmshowplayers 0;alias cl_dmshowplayers block_identiconmode;cl_dmsmallmap 0;alias cl_dmsmallmap block_identiconmode")
g_BlockCheck[id] = 0
}
public Used_identiconmode(id){
if (g_BlockCheck[id] == 1) return PLUGIN_CONTINUE
new Name[32]
get_user_name(id,Name,31)
server_print("Client %d %s try to change identiconmode",id,Name)
return PLUGIN_HANDLED
}
diamond-optic
08-22-2006, 11:34 PM
wierd lol.. played around with it a bit and got it to work lol..
thanks a ton!
diamond-optic
08-22-2006, 11:57 PM
ok only problem im having now is the dod_reloadtracers command..
which is supposed reforce the settings to clients incase you decide to change them while mid-game...
it comes up with them all being blocked..
any ideas?
How would I set it to show the tracers all the time? I was at a server today that showed some very nice yellow tracers on all weapons. It was great. I would like to turn that on here. I so far have noticed nothing with this plugin......
diamond-optic
08-27-2006, 08:43 PM
i could change my pistol tracers plugin to use cvars to select which weapons get tracers
Wilson [29th ID]
08-27-2006, 10:42 PM
diamond, you cannot change them midgame...well you can but every client would have to exit day of defeat and rejoin.
it re-aliases the client commands so they dont' get reset until they rejoin.
tegu, what server was it? I'd love to see that in action.
diamond-optic
08-27-2006, 10:50 PM
well ya i realize that..
but i kinda like how i have it now, cause alot of time i like changing them around in mid-game..
:-(
i could change my pistol tracers plugin to use cvars to select which weapons get tracers
Would you mind doing that for me as I am coding illiterate and am just now beginning to operate a server.
OR.... Tell me more detailed in what I have to do and I will attempt it?? :eek:
You can contact me direct if you prefer @ tegulizard@gmail.com
Great work btw diamond
diamond-optic
08-28-2006, 03:36 PM
it wont be hard to do at all.. and ill try to get around to it a little later today...
diamond-optic
08-28-2006, 10:00 PM
version 0.7
- 08.28.2006 Version 0.7
much better way of locking cmds (thanks Wilson [29th ID])
added OLD_METHOD define for selecting method of setting tracers
changed some returns
knife108
09-14-2007, 01:30 AM
nice plugin!
Go on D.O :p
politvs
02-06-2008, 01:23 PM
Hi!
The plugin is very nice and working well here, but what I'd really like to see is separte color per team... Could it be possible?
Thanks!
<PoLiTvS>
diamond-optic
07-27-2008, 08:50 PM
updated to v1.0
- 04.06.2008 Version 1.0
Code Improvements
knife108
09-16-2008, 01:16 AM
Does this one should work with DoD Tracers ?
diamond-optic
09-16-2008, 03:12 AM
hmm its been a while since ive used that one but i believe it does.. give it a try :)
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.