PDA

View Full Version : [CS:GO] Question


Krushy
10-11-2014, 13:29
Hi,

Is it possible to make download files to client if he accepts an option of a menu when it is in game?

splewis
10-11-2014, 14:14
Depending on what files you're trying to send, this extension might make it possible: https://forums.alliedmods.net/showthread.php?t=233549

Krushy
10-11-2014, 14:33
I want that client download musics

Krushy
10-11-2014, 15:20
Thx it work :-D

Krushy
10-11-2014, 18:18
How I can check that the player has well songs in his directory for not to redownload songs?


public OnClientPutInServer(Client)
{
if(!IsFakeClient(Client))
{
new namelen;
new FileType:type;
new String:name[64];
new String:soundname[64];
decl String:soundpath2[32];
Format(soundpath2, sizeof(soundpath2), "sound/musics/");
new Handle:pluginsdir = OpenDirectory(soundpath2);
if(pluginsdir != INVALID_HANDLE)
{
while(ReadDirEntry(pluginsdir,name,sizeof(nam e),type))
{
namelen = strlen(name) - 4;
if(StrContains(name,".mp3",false) == namelen)
{
Format(soundname, sizeof(soundname), "sound/musics/%s", name);
FNM_SendFile(Client, soundname);

}
}
}
}
}

bl4nk
10-11-2014, 22:47
Why not just add the file to the downloads table?

Krushy
10-12-2014, 03:21
I doesnt want that the players doownload files on loading.