WASSIm. Posted November 6, 2013 Share Posted November 6, 2013 hi guys i have problem to startResource. if stop this resource all resources in table stop. local ZAResources = { ["ZO-spawn"]=true, ["ZA-gang"]=true, ["ZA-level"]=true, ["ZA-misc"]=true, ["ZA-zombies"]=true, ["ZA-dxhelp"]=true, ["ZA-bosses"]=true, ["ZA-headlook"]=true, ["ZA-superman"]=true, ["ZA-Anti"]=true, ["ZA-damage"]=true, ["ZA-texture"]=true, ["ZA-blips"]=true, ["ZA-radar"]=true, ["ZA-staff"]=true, ["ZA-hud"]=true, ["ZA-vehicles"]=true, ["ZA-zones"]=true, ["ZA-interiors"]=true, ["ZA-gates"]=true, ["ZA-weapon-stid"]=true, ["ZA-warroom"]=true, ["ZA-Mods"]=true, ["ZA-heligrab"]=true, ["ZA-down"]=true, ["ZA-login"]=true, ["ZA-save"]=true, ["ZA-respawn"]=true, ["ZA-chat"]=true, ["ZA-LaserPointer"]=true, ["ZA-Glue"]=true, ["ZA-maps"]=true, ["ZA-tags"]=true, ["ZA-setting"]=true, ["ZA-info"]=true, ["ZA-ban"]=true } addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function( ) for i, resources in ipairs(getResources()) do if ( ZAResources[getResourceName(resources)] ) then local resourceName = getResourceName(resources) local start = startResource ( resources ) if ( start ) then outputDebugString ( resourceName.." was started successfully." ) else outputDebugString ( resourceName.." Failed to Started.", 1 ) end end end end ) Link to comment
ViRuZGamiing Posted November 6, 2013 Share Posted November 6, 2013 I'm a noob but maybe @ this; addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), function( ) for i, resources in ipairs(getResources()) do if ( ZAResources[getResourceName(resources)] ) then local resourceName = getResourceName(resources) local start = startResource ( resources ) if ( start ) then outputDebugString ( resourceName.." was started successfully." ) else outputDebugString ( resourceName.." Failed to Started.", 1 ) end end end end ) Normally if you stop the resource they should still run. Link to comment
WASSIm. Posted November 6, 2013 Author Share Posted November 6, 2013 -____- plis reread what is say Link to comment
TAPL Posted November 6, 2013 Share Posted November 6, 2013 Can't you just use the meta (include resource)? Link to comment
Atton Posted November 8, 2013 Share Posted November 8, 2013 startResource(getResourceFromName("DARES")) I have no idea if that will work. Link to comment
WASSIm. Posted November 8, 2013 Author Share Posted November 8, 2013 Can't you just use the meta (include resource)? if use include will all resource in include restart. Link to comment
Sora Posted November 8, 2013 Share Posted November 8, 2013 It's because that this resource is the thing 'element' that started these resources and when it stops unfortunately all other resources(which got started by this resource) will stop since this resource started them from the beginning Link to comment
WASSIm. Posted November 8, 2013 Author Share Posted November 8, 2013 how make one like what i mean 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