Jump to content

onplayerchat admin msg need help


IIIIlllllIII

Recommended Posts

Posted

hi i wanna make some script like when the admin type anything in the chat box all player see the admin

like when i type in chat box i see like this

admin-MOJRM-511

or

modrator-MOJRM-511

i mean in the chat box and i have this code pleez fix it

  
  
function onChat ( message, messageType ) 
    if messageType == 0 then 
        local root = getRootElement() 
        outputChatBox ( getPlayerName ( source ) .. "#ff0000admin: " .. message, getRootElement() ) 
        cancelEvent() 
        outputServerLog( "#ff0000admin: " .. getPlayerName ( source ).. "#ff0000admin: " .. message ) 
    end 
end 
addEventHandler ( "onPlayerChat", getRootElement(), onChat ) 
  

http://mojrm511.x10.mx

msn:

[email protected]

my server ip:

176.9.40.71:22779

-------------------------------------- 2012 updated--------

Posted

you just copy paste it from wiki after you check the messageType check the player acl group and if is admin then .. and if is modelator then ..

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

Posted
you just copy paste it from wiki after you check the messageType check the player acl group and if is admin then .. and if is modelator then ..

ok if you know the code pleez put your code here

im noob i dont know what you mean give me ur code and i take it

http://mojrm511.x10.mx

msn:

[email protected]

my server ip:

176.9.40.71:22779

-------------------------------------- 2012 updated--------

Posted

i don't have this code i don't need it and this is not a request forum (bk you need it i will not make it i have my own things to do .. ) make a part of code and we will correct the mistakes

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

Posted
addEventHandler ( "onPlayerChat" , root , 
function ( message , type ) 
if hasObjectPermissionTo ( source , "function.banPlayer" ) then 
cancelEvent ( ) 
outputChatBox ( "#ff0000admin " .. getPlayerName ( source ) .. " : " .. message, getRootElement() ) 
end 
end) 

And yeah, this is not a request forum, I just had time, next time try something yourself.

Business System viewtopic.php?f=108&t=35797

Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726

SQLite Tutorial viewtopic.php?f=148&t=38203

Posted

back

when i try this code

  
  
addEventHandler ( "onPlayerChat" , root , 
function ( message , type ) 
if hasObjectPermissionTo ( source , "function.banPlayer" ) then 
cancelEvent ( ) 
outputChatBox ( "#ff0000admin" .. getPlayerName ( source ) .. ":" .. message, getRootElement() ) 
end 
end) 
  
  
  
  

i dont see the color not working

115793xiqds.JPG

all works great but

i dont see the color when i put #ff0000 red color

the problem with the color not working

fix it pleeez

http://mojrm511.x10.mx

msn:

[email protected]

my server ip:

176.9.40.71:22779

-------------------------------------- 2012 updated--------

Posted

That's because the color codes aren't enabled.

addEventHandler ( "onPlayerChat" , root , 
function ( message , type ) 
if hasObjectPermissionTo ( source , "function.banPlayer" ) then 
cancelEvent ( ) 
local r, g, b = getPlayerNametagColor(source) 
outputChatBox ( "#ff0000admin" .. getPlayerName ( source ) .. ":" .. message, getRootElement(), r, g, b, true ) 
end 
end) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You say that now, but in another topic you said this:

"you too i dont know anything of what you say

^_^

your english too man lett me understand you"

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
You say that now, but in another topic you said this:

"you too i dont know anything of what you say

^_^

your english too man lett me understand you"

hahaha man dont be angry i kidding with you

we not english i mean you and me maybe sometime we have a problem with english

dont angry i kidding

http://mojrm511.x10.mx

msn:

[email protected]

my server ip:

176.9.40.71:22779

-------------------------------------- 2012 updated--------

Posted

I don't think you we're kidding, I know my English is not perfect, but it's not that bad either.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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...