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

[L4D1]Is it possible to check if client has certain file or not?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 08-16-2019 , 02:36   [L4D1]Is it possible to check if client has certain file or not?
Reply With Quote #1

server detects client has xxxx.vpk or not

example.
server checks every client has city17.vpk or not
useful when changing city17 map
__________________

Last edited by HarryPotter; 08-16-2019 at 03:16.
HarryPotter is offline
lugui
Senior Member
Join Date: Feb 2016
Location: GetClientAbsOrigin();
Old 08-16-2019 , 09:25   Re: [L4D1]Is it possible to check if client has certain file or not?
Reply With Quote #2

you could try to download the file from the clent, and check for FNM_OnFileDenied
https://forums.alliedmods.net/showthread.php?t=233549
__________________
Add me for commissions!
Steam: [U:1:88621772]
Discord: lugui#0889
My Plugins

Last edited by lugui; 08-16-2019 at 09:25.
lugui is offline
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
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 16:09.


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