Jump to content

[Help]Local Function use in 2 resources ?


Perfect

Recommended Posts

Posted

Hi All, Today i am thinking of can we use local function in 2 resources, if we made that local in 1 resouce ?

Ex:-

If i made something like this

local player = getLocalPlayer()

in 1 resource and i want to use that function in another resource without writing that (local player = getLocalPlayer()) again ?

I know somehow that is possible but i don't know how. which functions should i use to make that possible ?

(btw for the title i didn't get what to wrote, sorry)

Multi Theft Auto Player since middle of 2011.

Everybody want to act Crazy/Smart/Intelligent/Different/Unique/Innocent and Thats why I am Perfect.

Posted
ummm, you could export the function so any resource could use it, but you would need to call it using the call function, or using this little script:
exports.resourceName.functionName() 

.

hm, that is nice but i don't mean that. i mean if make local player = getLocalPlayer() function then i don't want to call it, retype it, etc... I want to use that (local player = getLocalPlayer()) function like we use getLocalPlayer().

again is it possible ?

Multi Theft Auto Player since middle of 2011.

Everybody want to act Crazy/Smart/Intelligent/Different/Unique/Innocent and Thats why I am Perfect.

Posted
I don't think it's possible.

can we do something like

local player = getLocalPlayer() and enable that function in all resources ? (when this resource start, its enable. when stop, not.)

Multi Theft Auto Player since middle of 2011.

Everybody want to act Crazy/Smart/Intelligent/Different/Unique/Innocent and Thats why I am Perfect.

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