FiGo Posted December 30, 2017 Posted December 30, 2017 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 1
Storm-Hanma Posted December 30, 2017 Posted December 30, 2017 Like this ?/staff will give skin 217 /staff will give skin 0? 2
FiGo Posted December 30, 2017 Author Posted December 30, 2017 (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 December 30, 2017 by FiGo
Storm-Hanma Posted December 30, 2017 Posted December 30, 2017 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 ! 2
Storm-Hanma Posted December 30, 2017 Posted December 30, 2017 I am out now when I reach home I will pass out you code You must use Setskin :https://wiki.multitheftauto.com/wiki/SetPlayerSkin 2
ÆBKV Posted January 2, 2018 Posted January 2, 2018 addCommandHandler("staff",root, function(player) if not getElementModel(player) == 217 then setElementModel(player,217) else setElementModel(player,0) end end ) 1
FiGo Posted January 3, 2018 Author Posted January 3, 2018 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
Storm-Hanma Posted January 3, 2018 Posted January 3, 2018 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 2
Storm-Hanma Posted January 3, 2018 Posted January 3, 2018 Use the modloader resource from MTA community will be easy without using code ,just put the GTA skin if id 217(wymclot)txd and dff in skins folder of modloader and run it and its there For code wise use this https://wiki.multitheftauto.com/wiki/EngineLoadDFF 2
FiGo Posted January 3, 2018 Author Posted January 3, 2018 But it will be for all people i need it with code
Storm-Hanma Posted January 3, 2018 Posted January 3, 2018 (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 January 3, 2018 by Khadeer143 1 1
ÆBKV Posted January 3, 2018 Posted January 3, 2018 <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
FiGo Posted January 4, 2018 Author Posted January 4, 2018 Aebkv it didnot work the function you wrote it
ÆBKV Posted January 4, 2018 Posted January 4, 2018 (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 January 4, 2018 by ÆBKV
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now