Problem with OnPlayerRequestDownload
#1

I'm having a problem with OnPlayerRequestDownload.
I've artwork 1 defined in server.cfg, but the download does not redirect.
Код:
new SERVER_DOWNLOAD[] = "https://github.com/SORRY?CENSORED?/FILES";
public OnPlayerRequestDownload(playerid, type, crc)
{
    if(!IsPlayerConnected(playerid)) return 0;
                    
	new asdas[64], filefound, final_url[256];
                
	if(type == DOWNLOAD_REQUEST_TEXTURE_FILE) filefound = FindTextureFileNameFromCRC(crc, asdas, sizeof(asdas));
	else if(type == DOWNLOAD_REQUEST_MODEL_FILE) filefound = FindModelFileNameFromCRC(crc, asdas, sizeof(asdas));
                    
	if(filefound)
	{
		format(final_url, sizeof(final_url), "%s/%s", SERVER_DOWNLOAD, asdas);
		RedirectDownload(playerid, final_url);
		printf("%s HAS STARTED DOWNLOADING ALL FILES FROM %s", PlayerOOCName(playerid), SERVER_DOWNLOAD);
	}      
	return 1;
}
My server.log is empty.
Can you help me, thanks.
Reply
#2

If SERVER_DOWNLOAD is a string why it hasn't size [ new SERVER_DOWNLOAD[128]; ]
Reply
#3

https://sampforum.blast.hk/showthread.php?tid=656282
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)