TheSmart Posted November 23, 2014 Posted November 23, 2014 hi guys im newbie at scripting i make script that replace skin but it not working can anyone help me? function replaceModel() txd = engineLoadTXD("skin.txd", 287 ) engineImportTXD(txd, 287) dff = engineLoadDFF("skin.dff", 287 ) engineReplaceModel(dff, 287) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) Thanks!
Bilal135 Posted November 23, 2014 Posted November 23, 2014 "skin.dff" ? Hell no, it ain't gonna work. Try renaming the dff and txd files to "army.dff" and "army.txd" & then try again. "Get busy living or get busy dying"
Anubhav Posted November 23, 2014 Posted November 23, 2014 (edited) "skin.dff" ? Hell no, it ain't gonna work. Try renaming the dff and txd files to "army.dff" and "army.txd" & then try again. Doesn't matter the name. addEventHandler second argument should be resourceRoot not getResourceRootElement ( getThisResource () ) - it's used for server and resourceRoot for client ( The thing you put on should be on onResourceStart and which I told should be on onClientResourceStart) Not on every event! So Bilal? Edited November 23, 2014 by Guest See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
xeon17 Posted November 23, 2014 Posted November 23, 2014 Anubhav pro A unique GangWar gamemode waiting for you!Click here for more information.
TheSmart Posted November 23, 2014 Author Posted November 23, 2014 still not working function replaceModel() txd = engineLoadTXD("army.txd", 287 ) engineImportTXD(txd, 287) dff = engineLoadDFF("army.dff", 287 ) engineReplaceModel(dff, 287) end addEventHandler ( "onClientResourceStart", ResourceRoot, replaceModel)
Anubhav Posted November 23, 2014 Posted November 23, 2014 function replaceModel() txd = engineLoadTXD("army.txd", 287 ) engineImportTXD(txd, 287) dff = engineLoadDFF("army.dff", 287 ) engineReplaceModel(dff, 287) end addEventHandler ( "onClientResourceStart", resourceRoot, replaceModel) See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
Et-win Posted November 23, 2014 Posted November 23, 2014 addEventHandler second argument should be resourceRoot not getResourceRootElement ( getThisResource () ) - it's used for server and resourceRoot for client Sorry, but I just have to comment on this: NO. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
Anubhav Posted November 23, 2014 Posted November 23, 2014 No problem See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
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