TheBite Posted January 31, 2013 Share Posted January 31, 2013 Hey to all, how to add a team in scoreboard named "BaW Staff" and in this team will added all of the server staff (admins, moderators e.c.)? PS: I tried to make a team with the admin panel but when reconnecting I'm not in the team and new stuff is not automatic added. PS2: This ( https://community.multitheftauto.com/ind ... ls&id=2911 ) resource is not working correctly. Link to comment
Adde Posted March 9, 2013 Share Posted March 9, 2013 (edited) server.lua BaWstaff = createTeam ( "BaWstaff", 100, 100, 100 ) function enterTEAM (player ) local accName1 = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Admin" ) ) or hasObjectPermissionTo( player, 'function.kickPlayer', false ) then setPlayerTeam ( player, BaWstaff) setElementModel( player, "217" ) setPlayerNametagColor ( player, 100, 100, 100 ) end addCommandHandler("joinstaff",enterTEAM) meta.xml "Me" version="1.0" type="script"/> This will create a team with name BaWstaff. Only Admins, Supermoderators, moderators will be able to enter the team (those who can kick players). The command to join team is /joinstaff Edited March 9, 2013 by Guest Link to comment
PaiN^ Posted March 9, 2013 Share Posted March 9, 2013 meta file is missing the info line .. Link to comment
Anderl Posted March 9, 2013 Share Posted March 9, 2013 server.lua BaWstaff = createTeam ( "BaWstaff", 100, 100, 100 ) function enterTEAM (player ) local accName1 = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Admin" ) ) or hasObjectPermissionTo( player, 'function.kickPlayer', false ) then setPlayerTeam ( player, BaWstaff) setElementModel( player, "217" ) setPlayerNametagColor ( player, 100, 100, 100 ) end addCommandHandler("joinstaff",enterTEAM) meta.xml "Me" version="1.0" type="script"/> This will create a team with name BaWstaff. Only Admins, Supermoderators, moderators will be able to enter the team (those who can kick players). The command to join team is /joinstaff Take a look at setElementModel's syntax. Link to comment
iPrestege Posted March 10, 2013 Share Posted March 10, 2013 server.lua BaWstaff = createTeam ( "BaWstaff", 100, 100, 100 ) function enterTEAM (player ) local accName1 = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Admin" ) ) or hasObjectPermissionTo( player, 'function.kickPlayer', false ) then setPlayerTeam ( player, BaWstaff) setElementModel( player, "217" ) setPlayerNametagColor ( player, 100, 100, 100 ) end addCommandHandler("joinstaff",enterTEAM) meta.xml "Me" version="1.0" type="script"/> This will create a team with name BaWstaff. Only Admins, Supermoderators, moderators will be able to enter the team (those who can kick players). The command to join team is /joinstaff BaWstaff = createTeam ( "BaWstaff", 100, 100, 100 ) function enterTEAM (player ) local accName1 = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Admin" ) ) or hasObjectPermissionTo( player, 'function.kickPlayer', false ) then setPlayerTeam ( player, BaWstaff) setElementModel( player, 217 ) setPlayerNametagColor ( player, 100, 100, 100 ) end end addCommandHandler("joinstaff",enterTEAM) 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