Jump to content

Replace infernus model for admins


N9.Xzi

Recommended Posts

Posted

Hello guys! I'm have problem with the replace car model for admin player. What the code for replace car model txd and dff only for admin or only team, please help!

Posted
--///Server 
  
  
function onlyAdmin() 
    if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then 
        for i,admin in pairs(getElementsByType("player")) do 
triggerClientEvent(admin, "onClientActiveMod", admin) 
        end 
end 
addCommandHandler( "infernus", onlyAdmin ) 
  
  
  
--///Client 
function administrator() 
txd = engineLoadTXD ( "folder-name.txd" ) 
engineImportTXD ( txd, 411 ) 
dff = engineLoadDFF ( "folder-name.dff" ) 
engineReplaceModel ( dff, 411 ) 
end 
addEvent("onClientActiveMod", true) 
addEventHandler("onClientActiveMod", root, administrator) 

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