Jump to content

Starting resource


Recommended Posts

Posted

I have a problem with this script will someone help me?

function Resource()
	local res = getResourceFromName("ResourceTest", true)
	startResource(res)
end

addCommandHandler("res", Resource)

 

Posted
--Server 
function Resource(playerSource, commandName )
	local res = getResourceFromName("ResourceTest")
	startResource(res)
end
addCommandHandler("res", Resource)

 

Posted

You haven't explained what the issue is, but I'm going to guess that the resource simply doesn't turn on when you type /res, and that is likely because you haven't given this resource (the one with this code snippet) ACL permission to function.startResource.

Posted
10 hours ago, Addlibs said:

You haven't explained what the issue is, but I'm going to guess that the resource simply doesn't turn on when you type /res, and that is likely because you haven't given this resource (the one with this code snippet) ACL permission to function.startResource.

Ok i understand, thx

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