Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <ftp>
- // Ha muszáj követni az elnevezéseket..
- #define Connect CreateFTP
- #define Disconnect DestroyFTP
- #define Download DownloadFTP
- public OnFilterScriptInit() {
- Connect("127.0.0.1", 21, "tesztnev", "tesztjelszo");
- return 1;
- }
- public OnFTPConnected(ftpId) {
- printf("[FTP #%i] Kapcsolat létrejött", ftpId);
- printf("[FTP #%i] Letöltés indítása... teszt.txt", ftpId);
- //Download(ftpId, "teszt.7z", "teszt.7z"); // nem jó
- // Nagyon alap, egy egyszerű txt fájl letöltése..
- Download(ftpId, "teszt.txt", "teszt.txt");
- return 1;
- }
- public OnFileDownloaded(ftpId, file[], savedAs[]) {
- printf("[FTP #%i] %s letöltve ide: %s", ftpId, file, savedAs);
- Disconnect(ftpId);
- return 1;
- }
- public OnFTPDisconnected(ftpId) {
- printf("[FTP #%i] Kapcsolat bontva", ftpId);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement