Jump to content

WHY THIS ALWAYS Happens?


xTravax

Recommended Posts

one is mod loader resource named carmod

and in it i found deleter.lua or something like that..maybe that cause the problem?

addCommandHandler ( "mdel", function ( player, _, modDir, modName ) 
    if not hasRights ( player ) then 
        return false 
    end 
     
    if type ( modDir ) ~= "string" or type ( modName ) ~= "string" then 
        outputDebugString ( "Please enter valid arguments! use 'mdel [moddir] [modname]'!" ) 
        return false         
    end 
     
    local txd = modDir.."/"..modName..".txd" 
    local dff = modDir.."/"..modName..".dff" 
    local hnd = modDir.."/"..modName..".hnd" 
     
    if fileExists ( txd ) then 
        fileDelete ( txd ) 
        xmlDestroyNode ( mods[txd] ) 
        outputDebugString ( "Deleted TXD in "..modDir.." for item "..modName ) 
    end 
     
    if fileExists ( dff ) then 
        fileDelete ( dff ) 
        xmlDestroyNode ( mods[dff] ) 
        outputDebugString ( "Deleted DFF in "..modDir.." for item "..modName ) 
    end 
     
    if fileExists ( hnd ) then 
        fileDelete ( hnd ) 
        outputDebugString ( "Deleted handling in "..modDir.." for item "..modName ) 
    end 
     
    outputDebugString ( "Deleted mod "..modName..". Restarting resource.." ) 
    restartResource ( ) 
     
    return true 
end ) 
  
  
  
addCommandHandler ( "mclear", function ( player, _, modDir ) 
    if not hasRights ( player ) then 
        return false 
    end 
     
    if type ( modDir ) ~= "string" then 
        outputDebugString ( "Please enter valid arguments! use 'mclear [moddir]'!" ) 
        return false         
    end 
     
    local tab 
    if modDir == "vehicles" then 
        tab = validVehicleModels 
    elseif modDir == "weapons" then 
        tab = validWeaponModels 
    elseif modDir == "skins" then 
        tab = validPedModels 
    else 
        outputDebugString ( "Please use a valid mod directory! Valids are: 'vehicles', 'weapons', 'skins'." ) 
        return false 
    end 
     
    for modelName,modelID in pairs ( tab ) do 
        local txd = modDir.."/"..modelName..".txd" 
        local dff = modDir.."/"..modelName..".dff" 
        local hnd = modDir.."/"..modelName..".hnd" 
         
        if fileExists ( txd ) then 
            fileDelete ( txd ) 
            xmlDestroyNode ( mods[txd] ) 
            outputDebugString ( "Deleted TXD in "..modDir.." for item "..modelName ) 
        end 
         
        if fileExists ( dff ) then 
            fileDelete ( dff ) 
            xmlDestroyNode ( mods[dff] ) 
            outputDebugString ( "Deleted DFF in "..modDir.." for item "..modelName ) 
        end 
         
        if fileExists ( hnd ) then 
            fileDelete ( hnd ) 
            outputDebugString ( "Deleted handling in "..modDir.." for item "..modelName ) 
        end 
    end 
     
    outputDebugString ( "Cleared mod directory "..modDir..". Restarting resource.." ) 
    restartResource ( ) 
     
    return true 
end ) 
  
  
  
function hasRights ( player ) 
    if getElementType ( player ) == "console" then 
        return true 
    end 
     
    local pAccount = getPlayerAccount ( player )  
    if isGuestAccount ( pAccount ) then 
        return false 
    end 
     
    if isObjectInACLGroup ( "user."..pAccount, aclGetGroup ( "admin" ) ) then 
        return true 
    end 
     
    return false 
end 

so....i just need to delete that script and edit meta.xml? and delete line which loads that script src delete.lua or something like that?

EDIT//Thanks i didn't notice that file..now it's delete thank you very much for help again.

Link to comment
In my Server i got real cars i mean mods skin mods weapon mods car mods tuning mods and that

and when some players join they download it and when they reconnect they got again to download....WHY?

How i can FIX THAT??PLS Help ME!!

If u use modloader please read the README file, there it says that you will have to rename you modds so when other players reconect they don't need to download them anymore. The problem is when the player logs on another server that has no mods and the client redownload the original cars, and when he enters again in yours he have to download the files again because they aren't the same....

Also, it's highly reccomended to change the resource name! If two servers use this resource, and you play on both, you will have to download the resource everytime you join the other server. So, this is easier for players, and saves you bandwidth usage.

If you don't change the name, you will get notified anyway

So rename the vehicles from the folder and rename (whit the same name) them also from the "data.lua" file.

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...