Raised This Month: $68 Target: $400
 17% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fbef0102
Member
Join Date: Sep 2017
Location: TW
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 fbef0102; 08-16-2019 at 03:16.
fbef0102 is offline
lugui
Senior Member
Join Date: Feb 2016
Location: Brasil
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
__________________

Last edited by lugui; 08-16-2019 at 09:25.
lugui is offline
fbef0102
Member
Join Date: Sep 2017
Location: TW
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);

__________________
fbef0102 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 07:06.


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