Monty Posted May 13, 2012 Share Posted May 13, 2012 hi... I downloaded this script https://community.multitheftauto.com/ind ... ls&id=1514 ... is it possible create a condition, an "if" refered to the group name??? Link to comment
Monty Posted May 13, 2012 Author Share Posted May 13, 2012 really? what's the code ??? Link to comment
Castillo Posted May 13, 2012 Share Posted May 13, 2012 My resource has exported functions, even thought I don't understand what do you want to do, you can take a look at them. Link to comment
ben_wright Posted May 13, 2012 Share Posted May 13, 2012 he wants to use the gang created in another resource within a function. Link to comment
yMassai Posted May 14, 2012 Share Posted May 14, 2012 an example would be creating weapons in one spot for only players of an group? Link to comment
Castillo Posted May 14, 2012 Share Posted May 14, 2012 Then you can use the exported function: getAccountGang ( accountName ) Link to comment
myonlake Posted May 14, 2012 Share Posted May 14, 2012 Also, do not create a thread dedicated to a user on forums. Use private message or make it public. Link to comment
Monty Posted May 14, 2012 Author Share Posted May 14, 2012 referes to the resource... what's wrong? basegate = createObject ( 3115, 1728.8000488281, -1378.0999755859, 13.5, 0, 90, 0 ) basecol = createColCircle ( 1728.8000488281, -1378.0999755859, 13.5, 7 ) function openbase_area69gates(thePlayer) local gang = getAccountGang ( accountName ) if gang == "FBI" then moveObject (basegate, 5000, 1728.8000488281, -1378.0999755859, 0 ) end end addEventHandler( "onColShapeHit", basecol, openbase_area69gates ) Link to comment
Michael# Posted May 14, 2012 Share Posted May 14, 2012 exports['gang-resource']:getAccountGang ( getPlayerAccount ( thePlayer ) ) Link to comment
Monty Posted May 14, 2012 Author Share Posted May 14, 2012 so is it correct??? basegate = createObject ( 3115, 1728.8000488281, -1378.0999755859, 13.5, 0, 90, 0 ) basecol = createColCircle ( 1728.8000488281, -1378.0999755859, 13.5, 7 ) function openbase_area69gates(thePlayer) local gang = exports['gang-resource']:getAccountGang ( getPlayerAccount ( thePlayer ) ) if gang == "FBI" then moveObject (basegate, 5000, 1728.8000488281, -1378.0999755859, 0 ) end end addEventHandler( "onColShapeHit", basecol, openbase_area69gates ) Link to comment
Castillo Posted May 14, 2012 Share Posted May 14, 2012 Then you can use the exported function: getAccountGang ( accountName ) Read my syntax Michael. accountName, not account element. @monty: basegate = createObject ( 3115, 1728.8000488281, -1378.0999755859, 13.5, 0, 90, 0 ) basecol = createColCircle ( 1728.8000488281, -1378.0999755859, 13.5, 7 ) function openbase_area69gates ( thePlayer ) local gang = exports [ 'gang-resource' ]:getAccountGang ( getAccountName ( getPlayerAccount ( thePlayer ) ) ) if ( gang == "FBI" ) then moveObject ( basegate, 5000, 1728.8000488281, -1378.0999755859, 0 ) end end addEventHandler ( "onColShapeHit", basecol, openbase_area69gates ) 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