Jump to content

Meta src path


dugasz1

Recommended Posts

If you want to use a OOP being loaded and/or used within a new resource, while this OOP is not inside the new resource, you could do 2 things out of my knowledge:

as example we use; the OOP resource you want to use is called 'ExistingOOP', and now you want to use it in your new resource, so...

1.

Simply just Copy the 'ExistingOOP' Folder, and rename the copy'd ExistingOOP folder to your liking,

then from there on, code whatever you where intended to do, like just use the same resource, but modify it.

or..

2.

Create a new folder, call it for example 'NewOOP', now open that folder,

create the meta.xml file, and 1 other folder, like 'files' or something, to put other files in for later on.. i geus,

now open your meta.xml in 'NewOOP', and on top, before every other syntax, (like second row of text.), so bellow "<meta>",

Put first this in to make sure you have any OOP function enabled because by default it's disabled!;

<oop>true</oop>

put in this piece of code under the other piece of code i described above;

<include resource="ExistingOOP" />

to make sure it has been loaded before anything else loads with your 'NewOOP' resource,

Now you should be fine using any client, server, shared, both, and other type's of using a script/oop to your liking!..

 

More Information can be found here:

Short Info, OOP: https://wiki.multitheftauto.com/wiki/OOP

Full Info, OOP (Introduction): https://wiki.multitheftauto.com/wiki/OOP_Introduction

meta.xml Info: https://wiki.multitheftauto.com/wiki/Meta.xml

(Look arround the meta.xml wiki page, there is some good detailed piece's of code there!).

 

Gr.xboxxxxd

 

PS: If anything is wrong on my reply here, feel free to correct me in any way possible, it won't bother me. ;)

Edited by xboxxxxd
Link to comment

I want to avoid the first method because it would be a lot of copy of the same file.

And the second is not the way too sadly, include doesn't load the included resources script files into that resource. (As far as i experienced include only force resource on client side to load before that script which includes that)

(My example maybe was a bit confusing i don't want to enable the oop MTA functionality just use a file in a resource which isn't in the resource's folder)

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