IIIIlllllIII Posted September 5, 2011 Share Posted September 5, 2011 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 ) Link to comment
bandi94 Posted September 5, 2011 Share Posted September 5, 2011 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 .. Link to comment
IIIIlllllIII Posted September 5, 2011 Author Share Posted September 5, 2011 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 Link to comment
bandi94 Posted September 5, 2011 Share Posted September 5, 2011 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 Link to comment
JR10 Posted September 5, 2011 Share Posted September 5, 2011 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. Link to comment
BinSlayer1 Posted September 5, 2011 Share Posted September 5, 2011 Admins won't be able to use /me anymore So use this line instead of old one: if hasObjectPermissionTo ( source , "function.banPlayer" ) and type == 0 then Link to comment
IIIIlllllIII Posted September 5, 2011 Author Share Posted September 5, 2011 thank you my friends i will test it and back agine Link to comment
CapY Posted September 5, 2011 Share Posted September 5, 2011 But you will output 2 messages . Link to comment
IIIIlllllIII Posted September 5, 2011 Author Share Posted September 5, 2011 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 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 Link to comment
Castillo Posted September 5, 2011 Share Posted September 5, 2011 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) Link to comment
IIIIlllllIII Posted September 5, 2011 Author Share Posted September 5, 2011 Solidsnake14 you the best you the king of scripters the script works great good thank you so much you really helped me all my problem you helped me thank you so much Link to comment
Castillo Posted September 5, 2011 Share Posted September 5, 2011 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" Link to comment
IIIIlllllIII Posted September 5, 2011 Author Share Posted September 5, 2011 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 Link to comment
Castillo Posted September 5, 2011 Share Posted September 5, 2011 I don't think you we're kidding, I know my English is not perfect, but it's not that bad either. 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