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

Whats called before client_connect?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JocAnis
Veteran Member
Join Date: Jun 2010
Old 02-20-2018 , 04:55   Whats called before client_connect?
Reply With Quote #1

hey guys...like title said, which function is called before client_connect? i will say plugin_init, but i guess its totally nonsense answer

why am asking this?
we know for the multi fast download plugin...if you know if it really has a point its cool if you share with us...in my opinion it will give more problems to the server than having only one sv_downloadurl link...
so my idea is:
check if: currentmap = "de_dust2" then 'amx_cvar sv_downloadurl FDL1'
else if currentmap = "de_arboretum" then 'amx_cvar sv_downloadurl FD2'
else = plugin continues with sv_downloadurl from server.cfg

so is it possible to make that fast, to check whats currentmap on the server and immediately change sv_downloadurl cvar, all has to be done before first player connect to the server (client_connect?)
i would like to see yes as answer, but im not that optimistic for this...im trying to make really practical/functional multi fast dl plugin (ofc no offense to author of current version of multi dl)
thanks in advance!
JocAnis is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 02-20-2018 , 15:17   Re: Whats called before client_connect?
Reply With Quote #2

There are several functions called before a player can join. Here are a few examples in order.
plugin_natives()
plugin_precache()
plugin_init()
I would use precache or init but I don't think it matters. I can't answer if it will actually work though.

Last edited by Black Rose; 02-21-2018 at 13:42.
Black Rose is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 02-20-2018 , 16:32   Re: Whats called before client_connect?
Reply With Quote #3

well thanks, i will probably test with all three and see the results...its matter of mili sec i think haha

Last edited by JocAnis; 02-20-2018 at 16:33.
JocAnis is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 02-21-2018 , 07:25   Re: Whats called before client_connect?
Reply With Quote #4

its impo to test on all, but its pain in a*s for testing on online server (in my case)...so i found 000webhost for free fdl storage, just to give an idea to others..:_)
JocAnis is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-21-2018 , 20:39   Re: Whats called before client_connect?
Reply With Quote #5

IIRC, 000webhost does not allow hosting files for fast download. You can use it if you want but don't be surprised if your account gets banned.
__________________
fysiks is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 02-24-2018 , 12:26   Re: Whats called before client_connect?
Reply With Quote #6

oo sh*t i hope its not true if does it matter: we are uploading max 70maps for pub server..so maybe it wont be a problem for that host

Last edited by JocAnis; 02-24-2018 at 12:27.
JocAnis is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 02-24-2018 , 13:49   Re: Whats called before client_connect?
Reply With Quote #7

It doesn't matter. And 70 maps is a lot.
__________________
Black Rose is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-24-2018 , 13:54   Re: Whats called before client_connect?
Reply With Quote #8

Quote:
Originally Posted by JocAnis View Post
oo sh*t i hope its not true if does it matter: we are uploading max 70maps for pub server..so maybe it wont be a problem for that host
Typically, it is not the amount of storage that violates the terms of service (TOS), it is the purpose of those files that does. FYI.
__________________
fysiks is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 02-25-2018 , 06:37   Re: Whats called before client_connect?
Reply With Quote #9

Quote:
Originally Posted by JocAnis View Post
oo sh*t i hope its not true if does it matter: we are uploading max 70maps for pub server..so maybe it wont be a problem for that host
you are basically using their free hosting service for file sharing, for them it's literally no difference whether you use FastDL or start sharing mp3 files you host there

the point is you use a ton of bandwidth compared to other crappy free host apps (tests, shit forums, etc), it will immediately stand out and you will get suspended



actually things like downloadurl are only allowed on VPS and upwards, never in shared hosting, maybe with some few exceptions, like a 20 eur a month shared hosting, which is basically just a managed VPS, just telling you this so you don't buy a 1 eur / month webhost and then get suspended on that as well
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.

Last edited by aron9forever; 02-25-2018 at 06:38.
aron9forever is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 02-25-2018 , 12:24   Re: Whats called before client_connect?
Reply With Quote #10

well i undestand it now...friend explained me to how multi fastdl plugin works, so i undestand the main purpose of it...thanks to everyone guys
JocAnis 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 03:19.


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