06.03.2019, 17:08
I'm having a problem with OnPlayerRequestDownload.
I've artwork 1 defined in server.cfg, but the download does not redirect.
My server.log is empty.
Can you help me, thanks.
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; }
Can you help me, thanks.