Albinix Posted May 6, 2010 Share Posted May 6, 2010 i have a problem i want to be when admin login he's get into admins team and when a member login he's get in the members team, but when a member login they get into admin team why? function createTeamsOnStart () teamAdmins = createTeam ( "Admins", 255, 100, 0 ) teamMembers = createTeam ( "Members", 0, 0, 255 ) teamGuests = createTeam ( "Guests", 255, 255, 255 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart ) addEventHandler( 'onPlayerJoin', root, function() setPlayerTeam ( source, teamGuests ) end ) addEventHandler( 'onPlayerLogin', root, function() if isObjectInACLGroup( 'user.Albinix', aclGetGroup( 'Admin' ) ) then setPlayerTeam ( source, teamAdmins ) else setPlayerTeam ( source, teamMembers ) end end ) Link to comment
NotAvailable Posted May 6, 2010 Share Posted May 6, 2010 i have a problem i want to be when admin login he's get into admins team and when a member login he's get in the members team, but when a member login they get into admin team why? function createTeamsOnStart () teamAdmins = createTeam ( "Admins", 255, 100, 0 ) teamMembers = createTeam ( "Members", 0, 0, 255 ) teamGuests = createTeam ( "Guests", 255, 255, 255 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart ) addEventHandler( 'onPlayerJoin', root, function() setPlayerTeam ( source, teamGuests ) end ) addEventHandler( 'onPlayerLogin', root, function() if isObjectInACLGroup( 'user.Albinix', aclGetGroup( 'Admin' ) ) then setPlayerTeam ( source, teamAdmins ) else setPlayerTeam ( source, teamMembers ) end end ) look this line: addEventHandler( '[color=#FF0000]onPlayerLogin[/color]', root, function() if isObjectInACLGroup( 'user.Albinix', aclGetGroup( 'Admin' ) ) then setPlayerTeam ( source, teamAdmins ) else setPlayerTeam ( source, teamMembers ) end end its onplayerlogin you need to change some things man Link to comment
NotAvailable Posted May 6, 2010 Share Posted May 6, 2010 i have a problem i want to be when admin login he's get into admins team and when a member login he's get in the members team, but when a member login they get into admin team why? function createTeamsOnStart () teamAdmins = createTeam ( "Admins", 255, 100, 0 ) teamMembers = createTeam ( "Members", 0, 0, 255 ) teamGuests = createTeam ( "Guests", 255, 255, 255 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart ) addEventHandler( 'onPlayerJoin', root, function() setPlayerTeam ( source, teamGuests ) end ) addEventHandler( 'onPlayerLogin', root, function() if isObjectInACLGroup( 'user.Albinix', aclGetGroup( 'Admin' ) ) then setPlayerTeam ( source, teamAdmins ) else setPlayerTeam ( source, teamMembers ) end end ) look this line: addEventHandler( '[color=#FF0000]onPlayerLogin[/color]', root, function() if isObjectInACLGroup( 'user.Albinix', aclGetGroup( 'Admin' ) ) then setPlayerTeam ( source, teamAdmins ) else setPlayerTeam ( source, teamMembers ) end end do you see the errors? tip: 1st line Link to comment
Albinix Posted May 7, 2010 Author Share Posted May 7, 2010 what should i chanhge to??? Link to comment
Castillo Posted May 7, 2010 Share Posted May 7, 2010 what should i chanhge to??? function createTeamsOnStart () teamAdmins = createTeam ( "Admins", 255, 100, 0 ) teamMembers = createTeam ( "Members", 0, 0, 255 ) teamGuests = createTeam ( "Guests", 255, 255, 255 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart ) addEventHandler( "onPlayerJoin", root, function() setPlayerTeam ( source, teamGuests ) end ) addEventHandler("onPlayerLogin", root, function() if isObjectInACLGroup( 'user.Albinix', aclGetGroup( 'Admin' ) ) then setPlayerTeam ( source, teamAdmins ) else setPlayerTeam ( source, teamMembers ) end end) this one works Link to comment
Albinix Posted May 7, 2010 Author Share Posted May 7, 2010 what should i chanhge to??? function createTeamsOnStart () teamAdmins = createTeam ( "Admins", 255, 100, 0 ) teamMembers = createTeam ( "Members", 0, 0, 255 ) teamGuests = createTeam ( "Guests", 255, 255, 255 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart ) addEventHandler( "onPlayerJoin", root, function() setPlayerTeam ( source, teamGuests ) end ) addEventHandler("onPlayerLogin", root, function() if isObjectInACLGroup( 'user.Albinix', aclGetGroup( 'Admin' ) ) then setPlayerTeam ( source, teamAdmins ) else setPlayerTeam ( source, teamMembers ) end end) this one works what have you changed? Link to comment
Castillo Posted May 7, 2010 Share Posted May 7, 2010 really, i forgot what i have changed 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