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

[REQ] Check sv_downloadurl


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bummps
Senior Member
Join Date: Mar 2009
Location: Brazil
Old 05-31-2009 , 03:11   [REQ] Check sv_downloadurl
Reply With Quote #1

Sometimes when a player join in your server he dont download from sv_downloadurl...

so, i need a plugin to check if player is downloading from sv_downloadurl, if he isnt recconect :l
__________________




Bummps is offline
xtremek
Senior Member
Join Date: Apr 2009
Old 05-31-2009 , 10:34   Re: [REQ] Check sv_downloadurl
Reply With Quote #2

Nice idea, sometimes it happens on my server too :\
__________________
xtremek is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 05-31-2009 , 10:45   Re: [REQ] Check sv_downloadurl
Reply With Quote #3

Good idea,

But i don't think its possible...

Or maybe something like

If player's download is longer the ... minutes, it reconnects...
But you got problems for the VERY BIG FILES then
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 05-31-2009 , 11:49   Re: [REQ] Check sv_downloadurl
Reply With Quote #4

Simple solution:
PHP Code:
#include <amxmodx>

new pcvar_mct

public plugin_init() {
    
register_plugin("NoDLFromServer""1.0""Sylwester")
    
pcvar_mct register_cvar("max_connect_time""20.0"_20.0)
}


public 
client_connect(id){
    
set_task(get_pcvar_float(pcvar_mct), "kick_me"id)
}


public 
client_putinserver(id){
    if(
task_exists(id))
        
remove_task(id)
}


public 
client_disconnect(id){
    if(
task_exists(id))
        
remove_task(id)
}


public 
kick_me(id){
    
server_cmd("kick #%d You must connect to server within %.0f seconds"get_user_userid(id), get_pcvar_float(pcvar_mct))

Player is not connected to server while downloading from sv_downloadurl, so you can kick him if he is connected for too long and still not in server.
Since server is sending data to player then it's probably possible to catch it and make more accurate plugin, but I don't know how...
__________________
Impossible is Nothing
Sylwester is offline
Bummps
Senior Member
Join Date: Mar 2009
Location: Brazil
Old 06-01-2009 , 01:07   Re: [REQ] Check sv_downloadurl
Reply With Quote #5

Try make a plugin to "Force" him download from sv_downloadurl nothing about kick... this will be better
__________________




Bummps is offline
xtremek
Senior Member
Join Date: Apr 2009
Old 06-07-2009 , 08:04   Re: [REQ] Check sv_downloadurl
Reply With Quote #6

That solution its not very good... can anyone make aplugin that kick just if the player is downloading the files from the server and not from the sv_downloadurl? thanks. I have all files on sv_downloadurl, so i think its easyer to make it.
__________________
xtremek is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-07-2009 , 17:47   Re: [REQ] Check sv_downloadurl
Reply With Quote #7

I dont' think you can detect someone downloading from the server.
__________________
fysiks is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-07-2009 , 18:07   Re: [REQ] Check sv_downloadurl
Reply With Quote #8

Wrong. There must be a way to detect if hlds running on your machine is sending data to player, but it may be very tricky...
__________________
Impossible is Nothing
Sylwester is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-07-2009 , 18:36   Re: [REQ] Check sv_downloadurl
Reply With Quote #9

I highly doubt amxx can do it (I'm sure there are ways that would be much more involved than just using amxx ).

There is almost always a way to do something but if you don't have the correct tools you probably can't do it.
__________________
fysiks is offline
csl
Member
Join Date: Apr 2009
Old 06-08-2009 , 05:48   Re: [REQ] Check sv_downloadurl
Reply With Quote #10

sv_downloadurl
not work properly for next map if the player was dropped, or when he downloading resources, click cancel and rejoin.
the fix is to restart the game (q tab ENTER) and connecting again, but this is not a solution.
10$ via paypal for who fix that.

Last edited by csl; 06-08-2009 at 06:02.
csl 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 10:59.


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