SA-MP Forums Archive
[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 017undefined symbol "DOWNLOAD_REQUEST_TEXTURE_FILE"
(61913) : error 017undefined symbol "FindTextureFileNameFromCRC"
(61913) : warning 202number of arguments does not match definition
(61914) : error 017undefined symbol "DOWNLOAD_REQUEST_MODEL_FILE"
(61915) : error 017undefined symbol "FindModelFileNameFromCRC"
(61915) : warning 202number of arguments does not match definition
(61920) : error 017undefined symbol "RedirectDownload"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase 
Code:

PHP код:
new SERVER_DOWNLOAD[] = "http://www.sxt-team.com/downloads/038/models";
public 
OnPlayerRequestDownload(playeridtypecrc)
{
    if(!
IsPlayerConnected(playerid))
        return 
0;
    new 
filename[64], filefoundurl_final[256];
    if(
type == DOWNLOAD_REQUEST_TEXTURE_FILE)
        
filefound FindTextureFileNameFromCRC(crcfilenamesizeof(filename));
    else if(
type == DOWNLOAD_REQUEST_MODEL_FILE)
        
filefound FindModelFileNameFromCRC(crcfilenamesizeof(filename));
    if(
filefound)
    {
        
format(url_finalsizeof(url_final), "%s/%s"SERVER_DOWNLOADfilename);
        
RedirectDownload(playeridurl_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.