Jump to content

Wrong whit admin name script


Minotaur

Recommended Posts

I have admin name script but i have one problem with this script i write one thin for example:Hello and write this example double :( so:

Mintoaur:Hello

[Admin]Minotaur:Hello

please help me

addEventHandler ( "onPlayerChat", root, 
function ( msg, type ) 
    if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Owner" ) ) and type == 0 then    
        cancelEvent ( ) 
        local r, g, b = getPlayerNametagColor(source) 
        outputChatBox ( "#FF0000[Owner]" .. getPlayerName ( source ) .. ":#FF0000 " .. msg, getRootElement(), r, g, b, true ) 
    elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) and type == 0 then 
        cancelEvent ( ) 
        local r, g, b = getPlayerNametagColor(source) 
        outputChatBox ( "#008000[Admin]" .. getPlayerName ( source ) .. ":#7FFF00 " .. msg, getRootElement(), r, g, b, true ) 
    elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Smallmoderator" ) ) and type == 0 then    
        cancelEvent ( ) 
        local r, g, b = getPlayerNametagColor(source) 
        outputChatBox ( "#C0C0C0[smallModerator]" .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true ) 
    elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Moderator" ) ) and type == 0 then    
        cancelEvent ( ) 
        local r, g, b = getPlayerNametagColor(source) 
        outputChatBox ( "#0000FF[Moderator]" .. getPlayerName ( source ) .. ":#8A2BE2 " .. msg, getRootElement(), r, g, b, true ) 
    elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "ClanACL" ) ) and type == 0 then    
        cancelEvent ( ) 
        local r, g, b = getPlayerNametagColor(source) 
        outputChatBox ( "#00FFFF|Clan name|" .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true ) 
         
        elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "ACL" ) ) and type == 0 then    
        cancelEvent ( ) 
        local r, g, b = getPlayerNametagColor(source) 
        outputChatBox ( "#A000FF*[ Owner ]   *" .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true )     
         
        elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "ACL" ) ) and type == 0 then    
        cancelEvent ( ) 
        local r, g, b = getPlayerNametagColor(source) 
        outputChatBox ( "#A000FF*[ CB ]   *" .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true )    
         
                elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "ACL" ) ) and type == 0 then    
        cancelEvent ( ) 
        local r, g, b = getPlayerNametagColor(source) 
        outputChatBox ( "#A000FF*[ King ]   *" .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true ) 
         
        elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "ACL" ) ) and type == 0 then    
        cancelEvent ( ) 
        local r, g, b = getPlayerNametagColor(source) 
        outputChatBox ( "#A000FF*[ PRO ]   *" .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true ) 
         
     
    elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Everyone" ) ) and type == 0 then    
        cancelEvent ( ) 
        local r, g, b = getPlayerNametagColor(source) 
        outputChatBox ( " " .. getPlayerName ( source ) .. ":#ffffff " .. msg, getRootElement(), r, g, b, true ) 
        end 
    end 
) 
  

Link to comment

freeroam is started?

freeroam disable and try

or

. Look for the file "fr_server.lua" and open.

3. Press CTRL + F and search for "msg: gsub"

4. Once you have found the "msg: gsub"

5. Delete this part:

Location r, g, b = getPlayerNametagColor (source)

outputChatBox (GetPlayerName (source) .. '# FFFFFF' .. msg: gsub ('#% x% x% x% x% x% x',''), g_Root, r, g, b, true)

outputServerLog ("CHAT:" .. GetPlayerName (source) .. ":" .. msg)

6. Save the file.

7. Paste this file in the zipped freeroam.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...