Raised This Month: $32 Target: $400
 8% 

Problem with FastDL


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
goose1702
New Member
Join Date: Mar 2019
Old 03-12-2019 , 01:44   Problem with FastDL
Reply With Quote #1

Hello, I am writing a plugin for a server and it requires files to be downloaded. However, it doesn't seem to download anytime the plugin is running and I attempt to join the server

Code:
public void OnPluginStart()
{	
	g_cvEnabled = CreateConVar("jb_markers_enable", "1", "Set to 0 to disable this plugin");
	g_bEnabled = GetConVarBool(g_cvEnabled);
	HookConVarChange(g_cvEnabled, Action_OnSettingsChange);
	
	RegConsoleCmd("sm_wmarker", Command_Beacon);
	CreateTimer(1.0, Timer_DrawMakers, _, TIMER_REPEAT);
	AddFileToDownloadsTable("materials/sprites/bhwarden/blueglow1.vmt");
	AddFileToDownloadsTable("materials/sprites/bhwarden/blueglow1.vtf");
}

public void OnMapStart()
{
	ResetMarker();
	
	g_beamsprite = PrecacheModel("materials/sprites/bhwarden/blueglow1.vmt");
	g_halosprite = PrecacheModel("materials/sprites/bhwarden/blueglow1.vmt");
}
Here is the only mention of the models in creation, both are defined above the snippet of code.

Server CVARs are:
sv_allowdownload 1
sv_allowupload 1
sv_forcepreload 1
sv_downloadurl "url"

Any help would be appreciated

Last edited by goose1702; 03-12-2019 at 01:57.
goose1702 is offline
impossible_cc
Senior Member
Join Date: Sep 2018
Location: Ukraine
Old 03-12-2019 , 03:53   Re: Problem with FastDL
Reply With Quote #2

https://sm.alliedmods.net/new-api/sd...DownloadsTable
impossible_cc is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 03-13-2019 , 09:44   Re: Problem with FastDL
Reply With Quote #3

You should include AddFileToDownloadsTable in OnMapStart forward, not in plugin start.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Reply


Thread Tools
Display Modes

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 21:26.


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