shoBy Posted September 1, 2014 Share Posted September 1, 2014 Hey guys...I tryed to make an admin plugin with ranks like : Owner, Co-Owner, Lead Admn, Admin, Moderator, Helper and Trial Helper...It doesn't work and I don't know how to make it work and I need your help...Please create one for me, or where I need to edit in acl.xml or anything to make it I need a plugin with prefix rank like: I am owner, so I want to change my name on Globalchat [Owner]shoBy (no [Global]). Please help me guys :o3 Link to comment
Saml1er Posted September 1, 2014 Share Posted September 1, 2014 (edited) I made a code for someone. You can use it local groups = { {"Admin", "#FF0000*[ Admin ]*"}, {"Mode","#00FF00*[ Moderator ]*"} , {"vip","#ffff00*[ V.I.P ]*"} , {"Owner","#A000FF*[ Owner ]*"}, {"SubAdmin","#0000ff*[ Sub Admin ]*"}, {"Everyone", "[ Everyone ]"} } local function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end addEventHandler ( "onPlayerChat", root, function ( msg, type ) if type == 0 then for i,v in pairs ( groups ) do if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( v[1] ) ) then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox ( v[2].. " "..RGBToHex(r,g,b) .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(),255,255,255, true ) break end end end end ) EDIT: If you see 2 outputs then that means play or freeroam is running. Edited September 2, 2014 by Guest Link to comment
shoBy Posted September 1, 2014 Author Share Posted September 1, 2014 I need to put this in acl.xml ? Or..? EDIT: And the acceses ? for the commands? Link to comment
Anubhav Posted September 1, 2014 Share Posted September 1, 2014 Add command.commandname in ACL. Link to comment
shoBy Posted September 1, 2014 Author Share Posted September 1, 2014 No....I say, your script, where should I put it ? And how...please explain to me. :o3 Link to comment
xeon17 Posted September 1, 2014 Share Posted September 1, 2014 https://wiki.multitheftauto.com/wiki/Sc ... troduction https://wiki.multitheftauto.com/wiki/Resources 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