Jump to content

Require some help.


Recommended Posts

Hello, I am still new to scripting in general and decided to do a skin mods script for the hell of it. When I made a server to test it out, I did /startres to start the resource but I keep getting "No resource found". My friend explained that this could be because of syntax error but due to my poor knowledge of Lua, I'm still unsure.

addEventHandler('onClientResourceStart',root, 
        function() 
                 lsv1 = engineLoadDFF ('lsv1.dff', 108 ) 
                 engineReplaceModel ( lsv1, 108 ) 
                  
                 lsv1 = engineLoadTXD ( 'lsv1.txd' ) 
                 engineImportTXD ( lsv1, 108 ) 
        end 
) 

Can anyone please help me or atleast tell me what I'm doing wrong? Your help would be much appreciated.

Link to comment

/start is command to start resource

addEventHandler('onClientResourceStart',resourceRoot, 
        function() 
                 lsv1 = engineLoadDFF ('lsv1.dff', 108 ) 
                 engineReplaceModel ( lsv1, 108 ) 
                  
                 lsv2 = engineLoadTXD ( 'lsv1.txd' ) 
                 engineImportTXD ( lsv2, 108 ) 
        end 
) 

Edited by Guest
Link to comment

The problem must be on the meta.xml, as the only problem I see in your script is at this line:

addEventHandler('onClientResourceStart',root, 

If you set it as "root", every time a resource starts ( ANY RESOURCE ) it'll execute that code, so you should change it to:

addEventHandler('onClientResourceStart',resourceRoot, 

Post your "meta.xml" content.

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