View Single Post
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 08-17-2019 , 02:18   Re: [L4D1]Is it possible to check if client has certain file or not?
Reply With Quote #3

Quote:
Originally Posted by lugui View Post
you could try to download the file from the clent, and check for FNM_OnFileDenied
https://forums.alliedmods.net/showthread.php?t=233549
thanks, man
filenetmessages.ext crash in l4d1 windows
linux works, but when I tested FNM_RequestFile
FNM_RequestFile(client, "addonlist.txt",0) - this does check client file "addonlist.txt" exists
FNM_RequestFile(client, "addons/city17.vpk",0) - this does not work

PHP Code:
public OnPluginStart()
{
    
RegConsoleCmd "sm_test" CmdTest"");
}

public 
Action:CmdTest(client,args)
{
    
PrintToChatAll("%N: FNM_RequestFile ID %i",client ,FNM_RequestFile(client"addons/city17.vpk",0)); //not work
    
PrintToChatAll("%N: FNM_RequestFile ID %i",client ,FNM_RequestFile(client"addonlist.txt",0)); //work
}

public 
FNM_OnFileDenied(client, const String:file[], transferID)
{
    
PrintToChatAll("OnFileDenied Notifier for %N - %s - %i"client,file,transferID);

__________________
HarryPotter is offline