AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [L4D1]Is it possible to check if client has certain file or not? (https://forums.alliedmods.net/showthread.php?t=318137)

HarryPotter 08-16-2019 02:36

[L4D1]Is it possible to check if client has certain file or not?
 
server detects client has xxxx.vpk or not

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

lugui 08-16-2019 09:25

Re: [L4D1]Is it possible to check if client has certain file or not?
 
you could try to download the file from the clent, and check for FNM_OnFileDenied
https://forums.alliedmods.net/showthread.php?t=233549

HarryPotter 08-17-2019 02:18

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

Originally Posted by lugui (Post 2663481)
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);




All times are GMT -4. The time now is 17:51.

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