Jump to content

Help me


FiGo

Recommended Posts

Posted

I need to make script that when i type a command to change to the first skin off staff and when i type the same command and with special number to change to another skin off staff

  • Confused 1
Posted (edited)

I need to make a 2 skins for staff every one with a command 

No the two will appeal on 217 but this with a skin and another skin

Edited by FiGo
Posted

Then you must use 2 different ids like this /staff for skin 217

/staff1 skin 0 or your choice of skin you want to 

Use set skin functions or search community there is already a resources name staff skin !

 

  • Thanks 2
Posted
addCommandHandler("staff",root,
function(player)
 if not getElementModel(player) == 217 then
    setElementModel(player,217)
 else
    setElementModel(player,0)
  end
end
)

 

 

  • Thanks 1
Posted

Like i have a txd and dff of a skin of staff and i have another skin for staff so i want to make /staffskin 1 to add a akin and when i make /staffskin 2 add the another skin

Posted

First convert gta skin to MTA skin ,then for staff1 use 217 skin id

For staff 2 use another skid id you want make a separate folder for both of them staff and staff2

 

 

 

  • Thanks 2
Posted (edited)

I can't code you now iam with mobile

Use this At line 3 and create a team staff and now its done 

if ( getTeamName(getPlayerTeam(thePlayer)) == "Staff" ) then

And remove get element model(player)217 then 

Edited by Khadeer143
  • Like 1
  • Thanks 1
Posted
<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

Posted (edited)
-- 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

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