Lodd Posted April 9, 2014 Posted April 9, 2014 Hey,it's me again,I'm here to ask you something about mixing scripts,first off,i made a model/texture replacer,and then I made a ped resource,and i'm trying to mix these im one ped createPed ( int 264, float 1, float 11, float 14 [, float rot = 0.0 ] ) function replaceModel() txd = engineLoadTXD("Skin/bigfoot.txd", 264 ) engineImportTXD(txd, 264) dff = engineLoadDFF("Skin/bigfoot.dff", 264 ) engineReplaceModel(dff, 264) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel ) the replacemodel function doesn't work ,it just create the ped without the custom skin!
Gallardo9944 Posted April 9, 2014 Posted April 9, 2014 of course. Since when do functions work like createPed(int 264...,)? Code Debugger - Minimalistic MTA debug line replacement
Lodd Posted April 9, 2014 Author Posted April 9, 2014 Well,int 264 is the model ID,I swapped the clown model for bigfoot's,it works if splitted,but when i try to merge the scripts,it won't work
Moderators IIYAMA Posted April 10, 2014 Moderators Posted April 10, 2014 you merge the code inside the resource of the models? Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Atton Posted April 10, 2014 Posted April 10, 2014 This code might be better. http://pastebin.com/nkhzqRgE Nikola Tesla is love Nikola Tesla is light. Email: [email protected]
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