Jump to content

[Help]TogglingMods


RaiDen#

Recommended Posts

Hey there , I want to know more about this script and how this workin (it xXMADEXx) I want to thank him for this great job cauz I was begging in one like this , I need a little help about how that is working

sec = {{{{{{},{},{},{}}}}}}            
  
function getRoSScripts( ) 
    callRemote ( "revolution-scripts.com/pages/others/MTA/resources.php",  
        function ( data ) 
            returnValue = data; 
        end, 'getScripts' 
    ) 
    return returnValue or false 
end 
  
addEvent ( "ROSDownlaoder:onClientRequestScripts", true ) 
addEventHandler ( "ROSDownlaoder:onClientRequestScripts", root, function ( ) 
    local scripts = getRoSScripts ( ) 
    triggerClientEvent ( source, "ROSDownloader:onClientGetScripts", source, scripts ) 
end ) 
  
function downloadScript( script )  
    theScript = script 
    fetchRemote ( 'revolution-scripts.com/pages/scripts/'..script..'/'..script..'.zip',  
        function ( data ) 
            local file = fileCreate ( "downloads/"..theScript..".zip" ) 
            fileWrite ( file, data, 0 ) 
            fileClose ( file ) 
            outputChatBox ( "The script "..theScript.." has successfully been downloaded! Directory: :"..getResourceName ( getThisResource ( ) ).."/downloads/"..theScript..".zip!", root, 0, 255, 0 ) 
        end 
    ) 
end 
addEvent ( "ROSDownloader:onClientDownloadScript", true ) 
addEventHandler ( "ROSDownloader:onClientDownloadScript", root, downloadScript ) 

Best regrads to Ros !

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...