Jump to content

Problem with skin script


SpecT

Recommended Posts

Hey guys!

I have made a script which changes your infernus to modded and default one by pressing F6. The problem is when the race gamemode is started and for example your nos is gone and you are waiting for it, when you press F6 you get a nos. And most players use it as SC (shortcut). They are making fake tops. So my question is is there any way to fix that problem/bug ?

Thanks!

Link to comment
local replaceModel = 1 
  
function infmod() 
    if getElementData(playerElement,"state") ~= "alive" then 
      if replaceModel == 1 then 
      replaceModel = 2 
      txd = engineLoadTXD("infernus.txd", 411) 
      engineImportTXD(txd,  411) 
      dff = engineLoadDFF("infernus.dff", 411) 
      engineReplaceModel(dff,  411) 
    elseif replaceModel == 2 then 
      replaceModel = 1 
      engineRestoreModel ( 411 ) 
      end 
    end 
end 
addEvent ( "restoreClientModel", true ) 
addEventHandler ( "restoreClientModel", getRootElement(), infmod ) 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), infmod) 
bindKey ("F6", "down", infmod ) 

Edited by Guest
Link to comment
  
local replaceModel = 1 
  
function infmod() 
    if getElementData(source,"state") ~= "alive" then 
      if replaceModel == 1 then 
      replaceModel = 2 
      txd = engineLoadTXD("infernus.txd", 411) 
      engineImportTXD(txd,  411) 
      dff = engineLoadDFF("infernus.dff", 411) 
      engineReplaceModel(dff,  411) 
    elseif replaceModel == 2 then 
      replaceModel = 1 
      engineRestoreModel ( 411 ) 
      end 
    end 
end 
addEvent ( "restoreClientModel", true ) 
addEventHandler ( "restoreClientModel", getRootElement(), infmod ) 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), infmod) 
bindKey ("F6", "down", infmod ) 
  

Link to comment
  
local replaceModel = 1 
  
function infmod() 
    if getElementData(source,"state") ~= "alive" then 
      if replaceModel == 1 then 
      replaceModel = 2 
      txd = engineLoadTXD("infernus.txd", 411) 
      engineImportTXD(txd,  411) 
      dff = engineLoadDFF("infernus.dff", 411) 
      engineReplaceModel(dff,  411) 
    elseif replaceModel == 2 then 
      replaceModel = 1 
      engineRestoreModel ( 411 ) 
      end 
    end 
end 
addEvent ( "restoreClientModel", true ) 
addEventHandler ( "restoreClientModel", getRootElement(), infmod ) 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), infmod) 
bindKey ("F6", "down", infmod ) 
  

The problem isn't gone ... It keeps filling up the nos after the skin change.

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