HLTV redirection script doesn't work
Hi,
I've coded a script that is to redirect HLTV proxies to a specified one. If you're running a game server and don't want ppl to waste your slots by connecting 20 HLTV proxies but still allow them to get the demos they want, you set up a single one, connect this one to your server and use my script to redirect all spectators to your HLTV server. Also players who spectated a specified number of rounds will be redirected to the HLTV server to no longer use the slot other ppl who want to play need. The thing is: Nothing works and I don't have a clue why. Could anyone please have a look at it and give me a hint? Thx a lot MGee €: Did a lot of work on this stuff, so have a look further down... |
Are the console_print, server_print, hudmessages, etc., showing up?
I've never tried it, but I would be more suprised than not if client_cmd's work on a hltv proxy. Janzert |
the client_cmds work, I've tested this with a clexec script I wrote ages ago, and the server does what it is told. I suppose the functions are never executed, since when I removed the first line checking the CVar value, this didn't have any effect. and the HUDs don't show up, neither is anything printed to console...
|
I don't have time to debug it here.
Probably the best thing to do is, start sprinking client_print(0,'s throughout the code till you understand what's happening. EDIT: Oh, and use amxx plugins in the console to make sure it's getting run ok. Janzert |
I did check amxx plugins list, the plugin is listed as "running", and I've actually had the server_prints as client_prints before I changed it to see if that works, but that didn't help...
|
Ok, put a client_print, or maybe better in this case MF_Log, at the top of each function to make sure it's getting called when you think it's supposed to. Then go from there till you find where something is happening different than expected.
Janzert |
I think the script actually does something, but that is the wrong thing :o
my brother was redirected to the HLTV server aftzer playing four rounds... I think I'll have to rewrite this stuff from scratch once again, there must be a big bug in there... I could use an ant-eater :p thx 4 help anyway... |
Code:
get_user_authid(id, cl_id, 4); // ID check - only 4 characters needed :: HLTVCode:
if(!((get_user_team(id) == 1) || (get_user_team(id) == 2))){ // If player is neither team 1 nor team 2, he's spectating cuz he can't be connecting due to line 71!Add a client_print just at line 80, just after the above if statement block, and check that it prints when you are sitting in spectator mode. Maybe resetHUD doesn't occur for spectators? In which case use register_logevent("cmd_specheck", 2, "1=Round_Start") and loop through the players. Janzert |
1 Attachment(s)
I did now have time to have another look at this script and I found quite a bunch of things that didn't work. thx @ Janzert for your great hint that specs don't trigger reset_hud! I now got the script to redirect spec'ing players to the specified HLTV server, but yet HLTV serers are not redirected.
I found those do not execute the commands they are given; neither do they show the console messages sent to them. Does anyone have a clue how I can send commands to them? Thx MGee |
Re: HLTV redirection script doesn't work
did anyone gave this a test?
|
| All times are GMT -4. The time now is 14:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.