[HELP] Redirect Download (0.3DL) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] Redirect Download (0.3DL) (
/showthread.php?tid=656103)
[HELP] Redirect Download (0.3DL) -
axellech - 07.07.2018
I'm trying to add Redirect to a gamemode in version 0.3dl, but I can not.
someone help me pls?
Erros:
PHP код:
(61905) : warning 235: public function lacks forward declaration (symbol "OnPlayerRequestDownload")
(61912) : error 017: undefined symbol "DOWNLOAD_REQUEST_TEXTURE_FILE"
(61913) : error 017: undefined symbol "FindTextureFileNameFromCRC"
(61913) : warning 202: number of arguments does not match definition
(61914) : error 017: undefined symbol "DOWNLOAD_REQUEST_MODEL_FILE"
(61915) : error 017: undefined symbol "FindModelFileNameFromCRC"
(61915) : warning 202: number of arguments does not match definition
(61920) : error 017: undefined symbol "RedirectDownload"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Code:
PHP код:
new SERVER_DOWNLOAD[] = "http://www.sxt-team.com/downloads/038/models";
public OnPlayerRequestDownload(playerid, type, crc)
{
if(!IsPlayerConnected(playerid))
return 0;
new filename[64], filefound, url_final[256];
if(type == DOWNLOAD_REQUEST_TEXTURE_FILE)
filefound = FindTextureFileNameFromCRC(crc, filename, sizeof(filename));
else if(type == DOWNLOAD_REQUEST_MODEL_FILE)
filefound = FindModelFileNameFromCRC(crc, filename, sizeof(filename));
if(filefound)
{
format(url_final, sizeof(url_final), "%s/%s", SERVER_DOWNLOAD, filename);
RedirectDownload(playerid, url_final);
}
return 1;
}
Re: [HELP] Redirect Download (0.3DL) -
CantBeJohn - 07.07.2018
PHP код:
(61905) : warning 235: public function lacks forward declaration (symbol "OnPlayerRequestDownload")
This suggests that you're not using 0.3.DL's a_samp include. Download 0.3.DL's server package files and update your includes.