07.07.2018, 07:40
I'm trying to add Redirect to a gamemode in version 0.3dl, but I can not.
someone help me pls?
Erros:
Code:
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
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;
}