Raised This Month: $ Target: $400
 0% 

Download Prob!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fredd
Veteran Member
Join Date: Jul 2007
Old 05-05-2009 , 03:46   Re: Download Prob!
Reply With Quote #1

andi67@: i use something similar which just adds everything to the downloadables table and precaches mdl files...
Code:
public OnMapStart()
{
	decl String:File[260]; // max platform path for win i think.
	BuildPath(Path_SM, File, sizeof(File), "blah/blah/downloads.ini");
	new Handle:FileHndl = OpenFile(File, "r");
	decl String:buffer[260];
	while (ReadFileLine(FileHndl, buffer, sizeof(buffer)))
	{
		new len = strlen(buffer);
		if(buffer[len-1] == '\n')
			buffer[--len] = '\0';
		
		if (FileExists(buffer))
		{
			AddFileToDownloadsTable(buffer);
			
			if(StrEqual(buffer[len-3], "mdl"))
				PrecacheModel(buffer, true);
		}
		
		if (IsEndOfFile(FileHndl))
		{
			CloseHandle(FileHndl);	
			break;
		}
	}
}
just put everything int that ini file..
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!
Fredd 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 07:20.


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