MuStAfA Posted March 14, 2013 Posted March 14, 2013 Hey guys can u help me ? i want a resource from which other resouces can be started example i type "start resourcestarter" and those resources start which i want ! Please help! Thanks.
iPrestege Posted March 14, 2013 Posted March 14, 2013 You can try this server side script : addEventHandler("onResourceStart", resourceRoot, function() Resources = { "resourceName", "resourceName", "resourceName", } for index,resource in ipairs ( Resources ) do startResource(getResourceFromName(resource)) end end ) how to add resource to start? just change resourceName to you're resourceName and add new resource add new line "resourceName",
MuStAfA Posted March 14, 2013 Author Posted March 14, 2013 You can try this server side script : addEventHandler("onResourceStart", resourceRoot, function() Resources = { "resourceName", "resourceName", "resourceName", } for index,resource in ipairs ( Resources ) do startResource(getResourceFromName(resource)) end end ) how to add resource to start? just change resourceName to you're resourceName and add new resource add new line "resourceName", look this is the error http://imageshack.us/photo/my-images/703/errorjr.png/
iPrestege Posted March 14, 2013 Posted March 14, 2013 Did you add the reousrce to admin group in the acl ? open admin panel the manageAcl>Admin group>addObject>resource.TheResourceName That's all .
Renkon Posted March 14, 2013 Posted March 14, 2013 That's not all, there's a syntax error in the third variable insidet he table, remove the comma
iPrestege Posted March 14, 2013 Posted March 14, 2013 That's not all, there's a syntax error in the third variable insidet he table, remove the comma Oh.i forget that try this : addEventHandler("onResourceStart", resourceRoot, function() Resources = { "resourceName", "resourceName", "resourceName" } for index,resource in ipairs ( Resources ) do startResource(getResourceFromName(resource)) end end )
MuStAfA Posted March 14, 2013 Author Posted March 14, 2013 That's not all, there's a syntax error in the third variable insidet he table, remove the comma Oh.i forget that try this : addEventHandler("onResourceStart", resourceRoot, function() Resources = { "resourceName", "resourceName", "resourceName" } for index,resource in ipairs ( Resources ) do startResource(getResourceFromName(resource)) end end ) new error look this http://imageshack.us/photo/my-images/593/errorro.png/
MuStAfA Posted March 14, 2013 Author Posted March 14, 2013 Post you're code after edit it. addEventHandler("onResourceStart", resourceRoot, function() Resources = { "panel" "hunter" "respawn" } for index,resource in ipairs ( Resources ) do startResource(getResourceFromName(resource)) end end )
iPrestege Posted March 14, 2013 Posted March 14, 2013 addEventHandler("onResourceStart", resourceRoot, function() Resources = { "panel", "hunter", "respawn" } for index,resource in ipairs ( Resources ) do startResource(getResourceFromName(resource)) end end ) try
MuStAfA Posted March 14, 2013 Author Posted March 14, 2013 addEventHandler("onResourceStart", resourceRoot, function() Resources = { "panel", "hunter", "respawn" } for index,resource in ipairs ( Resources ) do startResource(getResourceFromName(resource)) end end ) try this error is coming again http://imageshack.us/photo/my-images/703/errorjr.png/
iPrestege Posted March 14, 2013 Posted March 14, 2013 Are you sure you add the resource to acl ? admin group? resource.resourceStarterName ???
MuStAfA Posted March 14, 2013 Author Posted March 14, 2013 Are you sure you add the resource to acl ? admin group? resource.resourceStarterName ??? o it works thanks. congradulations to u and me
iPrestege Posted March 14, 2013 Posted March 14, 2013 You're Welcome Topic Should Move To Scripting Section .
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