Monty Posted May 25, 2012 Share Posted May 25, 2012 what's wrong? function createFBITeam () ARMYTeam = createTeam ("ARMY", 0, 102, 0) end addEventHandler ("onResourceStart", resourceRoot, createFBITeam) function joinARMY() local gang = exports [ 'ROADgang' ]:getAccountGang ( getAccountName ( getPlayerAccount ( client ) ) ) --changed source to client (for safety reasons) if ( gang == "ARMY" ) then setPlayerTeam(source,ARMYTeam) local acc = getAccountName( source ) if acc == "stolka" then setElementModel(source,73) esle setElementModel(source,287) giveWeapon ( source, 31, 120 ) setElementData( source, "Occupation", "ARMY", true ) outputChatBox("You are now an ARMY soldier.",source,0,255,0) end end end addEvent("setARMY", true) addEventHandler("setARMY",root,joinARMY) Link to comment
Kenix Posted May 25, 2012 Share Posted May 25, 2012 esle Maybe else ? local acc = getAccountName( source ) it's wrong. You should use getPlayerAccount source is not account. local acc = getAccountName( getPlayerAccount( source ) ) 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