Young$ Posted January 16, 2012 Share Posted January 16, 2012 ok hallo! i want to add colums on me scoreboard (serverowner,admin,moderators,members,players) there is a script but where to put it in meta xml but where!1! help me plz Link to comment
Al3grab Posted January 16, 2012 Share Posted January 16, 2012 to add colums to the scoreboard use exports.scoreboard:scoreboardAddColumn("Column Name") Link to comment
Blaawee Posted January 16, 2012 Share Posted January 16, 2012 mybe this will do the job -- Server Side exports.scoreboard:scoreboardAddColumn("ACL") function set(player) local admin = "Admin" local supermoderator = "SuperModerator" local moderator = "Moderator" local everyone = "Visitor" local console = "HeadAdmin" if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Admin" ) ) then setElementData ( player, "ACL", admin ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "SuperModerator" ) ) then setElementData ( player, "ACL", supermoderator ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Moderator" ) ) then setElementData ( player, "ACL", moderator ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Console" ) ) then setElementData ( player, "ACL", console ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Everyone" ) ) then setElementData ( player, "ACL", everyone ) end end function timer() setTimer( set, 1000, 1, source ) end addEventHandler("onPlayerLogin", getRootElement(), timer) addEventHandler("onPlayerJoin", getRootElement(), timer) Link to comment
Castillo Posted January 16, 2012 Share Posted January 16, 2012 exports.scoreboard:scoreboardAddColumn("ACL") function setACL(player) local admin = "Admin" local supermoderator = "SuperModerator" local moderator = "Moderator" local everyone = "Visitor" local console = "HeadAdmin" if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Admin" ) ) then setElementData ( player, "ACL", admin ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "SuperModerator" ) ) then setElementData ( player, "ACL", supermoderator ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Moderator" ) ) then setElementData ( player, "ACL", moderator ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Console" ) ) then setElementData ( player, "ACL", console ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Everyone" ) ) then setElementData ( player, "ACL", everyone ) end end function timer() setTimer( setACL, 1000, 1, source ) end addEventHandler("onPlayerLogin", getRootElement(), timer) addEventHandler("onPlayerJoin", getRootElement(), timer) Never use a existing function name. Link to comment
Young$ Posted January 17, 2012 Author Share Posted January 17, 2012 only where in meta.xml? and what program??? Link to comment
Blaawee Posted January 17, 2012 Share Posted January 17, 2012 only where in meta.xml? and what program??? not the meta.xml you should put it in .lua script and includ it in the meta.xml -- meta.xml "your name" type="misc" name="ACL in scoreboard" /> -- acl.lua exports.scoreboard:scoreboardAddColumn("ACL") function setACL(player) local admin = "Admin" local supermoderator = "SuperModerator" local moderator = "Moderator" local everyone = "Visitor" local console = "HeadAdmin" if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Admin" ) ) then setElementData ( player, "ACL", admin ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "SuperModerator" ) ) then setElementData ( player, "ACL", supermoderator ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Moderator" ) ) then setElementData ( player, "ACL", moderator ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Console" ) ) then setElementData ( player, "ACL", console ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Everyone" ) ) then setElementData ( player, "ACL", everyone ) end end function timer() setTimer( setACL, 1000, 1, source ) end addEventHandler("onPlayerLogin", getRootElement(), timer) addEventHandler("onPlayerJoin", getRootElement(), timer) Link to comment
Young$ Posted January 17, 2012 Author Share Posted January 17, 2012 oh that's easy thnx Link to comment
Young$ Posted January 17, 2012 Author Share Posted January 17, 2012 omg how to make a ACL.LUA? Link to comment
Blaawee Posted January 17, 2012 Share Posted January 17, 2012 you can use : Notepad++ or see this topics : viewtopic.php?f=91&t=31891 viewtopic.php?f=91&t=30077 Link to comment
Young$ Posted January 17, 2012 Author Share Posted January 17, 2012 tdma\Scoreboard\tdma_scoreboard_stats.lua:87: call: failed to call 'scoreboard:addScoreboardColumn'? ERROR: tdma\Scoreboard\tdma_scoreboard_stats.lua:70: call: failed to call 'scoreboard:removeScoreboardColumn' [2012-01-17 19:53:39] ERROR: tdma\Scoreboard\tdma_scoreboard_stats.lua:83: call: failed to call 'scoreboard:removeScoreboardColumn' [2012-01-17 19:53:39] ERROR: tdma\Scoreboard\tdma_scoreboard_stats.lua:95: call: failed to call 'scoreboard:removeScoreboardColumn' [2012-01-17 19:53:39] ERROR: tdma\Scoreboard\tdma_scoreboard_stats.lua:107: call: failed to call 'scoreboard:removeScoreboardColumn'?????? why Link to comment
Blaawee Posted January 17, 2012 Share Posted January 17, 2012 is your scoreboard called : scoreboard ? Link to comment
Young$ Posted January 17, 2012 Author Share Posted January 17, 2012 only where in meta.xml? and what program??? not the meta.xml you should put it in .lua script and includ it in the meta.xml -- meta.xml "your name" type="misc" name="ACL in scoreboard" /> -- acl.lua exports.scoreboard:scoreboardAddColumn("ACL") function setACL(player) local admin = "Admin" local supermoderator = "SuperModerator" local moderator = "Moderator" local everyone = "Visitor" local console = "HeadAdmin" if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Admin" ) ) then setElementData ( player, "ACL", admin ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "SuperModerator" ) ) then setElementData ( player, "ACL", supermoderator ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Moderator" ) ) then setElementData ( player, "ACL", moderator ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Console" ) ) then setElementData ( player, "ACL", console ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Everyone" ) ) then setElementData ( player, "ACL", everyone ) end end function timer() setTimer( setACL, 1000, 1, source ) end addEventHandler("onPlayerLogin", getRootElement(), timer) addEventHandler("onPlayerJoin", getRootElement(), timer) i have type the same? Link to comment
Young$ Posted January 18, 2012 Author Share Posted January 18, 2012 plz help any1!!!!!!!!!!!!!!! this is what it says ERROR: [gameplay]\scoreboard\acl.lua:1: attempt to call a nil value ERROR: [gameplay]\scoreboard\acl.lua:1: call: failed to call 'scoreboard:addScoreboardColumn' ] ERROR: attempt to call a nil value [string "?"] ERROR: call: failed to call 'scoreboard:scoreboardAddColumn' [string "?" Link to comment
Blaawee Posted January 18, 2012 Share Posted January 18, 2012 rename your scoreboard resource to : scoreboard Link to comment
Blaawee Posted January 18, 2012 Share Posted January 18, 2012 then download it from here http://mtasa-resources.googlecode.com/f ... s-r825.zip Link to comment
Young$ Posted January 18, 2012 Author Share Posted January 18, 2012 is that scoreboard column? Link to comment
Blaawee Posted January 18, 2012 Share Posted January 18, 2012 (edited) yes it is see cerfully exports . scoreboard : >|scoreboardAddColumn|< ("ACL") Edited January 18, 2012 by Guest Link to comment
Castillo Posted January 18, 2012 Share Posted January 18, 2012 That's too f*** wrong: exports["scoreboard"]:scoreboardAddColumn("ACL") Link to comment
Blaawee Posted January 18, 2012 Share Posted January 18, 2012 yes it is see cerfully exports . scoreboard : >|scoreboardAddColumn|< ("ACL") i'm just showing to him that's is column 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