Raised This Month: $ Target: $400
 0% 

Plugin connect script help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kmal2t
BANNED
Join Date: Apr 2006
Old 04-21-2006 , 02:09   Plugin connect script help
Reply With Quote #1

asdf

Last edited by kmal2t; 05-21-2007 at 04:40.
kmal2t is offline
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 04-21-2006 , 03:16  
Reply With Quote #2

1. You can't check if file exists on client.
2. You can't precache zip files.
__________________
FatalisDK is offline
kmal2t
BANNED
Join Date: Apr 2006
Old 04-21-2006 , 04:03  
Reply With Quote #3

Ok, wait. Isn't that what that plugin above does? !if file_exists()? What's that then? How does STEAM know to make you download the file if it doesn't know whether or not you have the file?

And if you can't use sv_downloadurl with zip files that doesn't matter since I can still add an empty ini or cfg or something in the zip that when extracted I can use to for detection.
kmal2t is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 04-21-2006 , 17:36  
Reply With Quote #4

file_exists() checks to see if the server has the file. The engine decides when a client needs to download a file if a file has been precached, and the file is not found in the specifed location.


Based on the statement above, I think you mis-understood EKS's code.

Code:
if(!file_exists(OverViewFile))     {         log_amx("Missing overview file for %s ( should be in: %s )",MapName,OverViewFile)             }

The following code checks to see if the file exists on the server. If the file is not detected, then the plugin will make output a message to the log file (log_amx()) The reason for this if-statement is to make sure the file exists before precaching it, or else if we do this and the file isn't there, the server will crash.


Code:
else         precache_generic(OverViewFile)

If the if-statement's requirements above are not meet, it then go to the else statement, meaning the file was found. The plugin then tells the engine to precache the file. As stated before, if the engine does not detect the file on a connecting client, it will download it.

Hope this clears everything up
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
kmal2t
BANNED
Join Date: Apr 2006
Old 04-21-2006 , 20:23  
Reply With Quote #5

brawr

Last edited by kmal2t; 05-21-2007 at 04:40.
kmal2t is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-21-2006 , 22:43  
Reply With Quote #6

To precache a sprite you would use precache_model.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
kmal2t
BANNED
Join Date: Apr 2006
Old 04-22-2006 , 00:26  
Reply With Quote #7

???

I don't want to precache a sprite. Since apparently you can't use zip files for sv_downloadurl I want to be able to give people a message before they try to download shit so I can redirect them to download the zip. There must be some way to do this.
kmal2t is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 04-22-2006 , 00:34  
Reply With Quote #8

Sorry. There isn't an easy way.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
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 05:14.


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