Jump to content

cancel event or function


botshara

Recommended Posts

Client Side ---

function replaceModel()  
  txd2 = engineLoadTXD("sentinel.txd", 405 ) 
  engineImportTXD(txd2, 405) 
  dff2 = engineLoadDFF("sentinel.dff", 405 ) 
  engineReplaceModel(dff2, 405)     
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) 
  

I need make when write /stopmods then stops replace_Model function, how to make it ?

Link to post
addCommandHandler("stopmods", 
function () 
engineRestoreModel(405) 
end) 

Or with a model setting:

  
function restore (cmd,model) 
if model then 
engineRestoreModel(tonumber(model)) 
else 
outputChatBox("Please specify model ID",255,0,0) 
end 
end 
addCommandHandler("stopmods",restore) 

In the last case it would be, /stopmods [MODELID]

Please note, that it would only restore the model for the client executing the command.

Link to post

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