MuStAfA Posted March 14, 2013 Share 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. Link to comment
iPrestege Posted March 14, 2013 Share 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", Link to comment
MuStAfA Posted March 14, 2013 Author Share 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/ Link to comment
iPrestege Posted March 14, 2013 Share 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 . Link to comment
Renkon Posted March 14, 2013 Share Posted March 14, 2013 That's not all, there's a syntax error in the third variable insidet he table, remove the comma Link to comment
iPrestege Posted March 14, 2013 Share 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 ) Link to comment
MuStAfA Posted March 14, 2013 Author Share 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/ Link to comment
iPrestege Posted March 14, 2013 Share Posted March 14, 2013 Post you're code after edit it. Link to comment
MuStAfA Posted March 14, 2013 Author Share 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 ) Link to comment
iPrestege Posted March 14, 2013 Share 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 Link to comment
MuStAfA Posted March 14, 2013 Author Share 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/ Link to comment
iPrestege Posted March 14, 2013 Share Posted March 14, 2013 Are you sure you add the resource to acl ? admin group? resource.resourceStarterName ??? Link to comment
MuStAfA Posted March 14, 2013 Author Share 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 Link to comment
iPrestege Posted March 14, 2013 Share Posted March 14, 2013 You're Welcome Topic Should Move To Scripting Section . Link to comment
Castillo Posted March 14, 2013 Share Posted March 14, 2013 Topic moved to scripting section. Link to comment
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