Jump to content

Help me


FiGo

Recommended Posts

<meta>
  <script src="client.lua" type="client" />
  <script src="server.lua" type="server" />
  <file src="wmyclot1.txd" />
  <file src="wmyclot1.dff" />
  <file src="wmyclot2.txd" />
  <file src="wmyclot2.dff" />
</meta>
-- SERVER -- 

addCommandHandler("staff1",
addCommandHandler("staff2",
function(command)
  if command == "staff1" then
    triggerClientEvent("model1",root,model1)
  elseif command == "staff2" then
    triggerClientEvent("model2",root,model2)
  end
end
)
-- CLIENT --

addEvent("model1",true)
addEventHandler("model1",
function()
  txd = engineLoadTXD("wmyclot1.txd")
  engineImportTXD(txd,217)
  dff = engineLoadDFF("wmyclot1.dff")
  engineReplaceModel(dff,217)
end
)

addEvent("model2",true)
addEventHandler("model2",
function()
  txd = engineLoadTXD("wmyclot2.txd")
  engineImportTXD(txd,217)
  dff = engineLoadDFF("wmyclot2.dff")
  engineReplaceModel(dff,217)
end
)

try this

Link to comment
-- CLIENT --

addEvent("model1",true)
addEventHandler("model1",root,
function()
  txd = engineLoadTXD("wmyclot1.txd")
  engineImportTXD(txd,217)
  dff = engineLoadDFF("wmyclot1.dff")
  engineReplaceModel(dff,217)
end
)

addEvent("model2",true)
addEventHandler("model2",root,
function()
  txd = engineLoadTXD("wmyclot2.txd")
  engineImportTXD(txd,217)
  dff = engineLoadDFF("wmyclot2.dff")
  engineReplaceModel(dff,217)
end
)
-- SERVER --

addCommandHandler("staff1",
function(player)
  triggerClientEvent(player,"model1",player)
  outputChatBox("[Staff model 1]",player,255,255,0)
end
)

addCommandHandler("staff2",
function(player)
  triggerClientEvent(player,"model2",player)
  outputChatBox("[Staff model 2]",player,255,255,0)
end
)
<meta>
  <script src="client.lua" type="client" />
  <script src="server.lua" type="server" />
  <file src="wmyclot1.txd" />
  <file src="wmyclot1.dff" />
  <file src="wmyclot2.txd" />
  <file src="wmyclot2.dff" />
</meta>

That should work

Edited by ÆBKV
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...