Jump to content

طلب ..


Adham

Recommended Posts

سلام عليكم

مسوي شات تيم

ومود تاقات اخر في الشات

لما بكتب في شات التيم

يظهر في شات التيم والعام

ال2 مع بعض

الناس قلتلي حط داتا في مود التاقات لـ مود التيمات

مود التيمات الداتا تبعه

if ( getElementData ( "team", true )  ) then

مدري م عارف احطه مع التاقات

كود التاقات ..

function chatbox( text, type)
	local acc = getPlayerAccount(source)
	if ChatDisabled then
		if not isGuestAccount ( acc ) then
			if not isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Console")) then 
				outputChatBox ( "Chat locked.", source, 255, 150, 0, true )
				cancelEvent ( ) 
				return 
			end
		else
			outputChatBox ( "Chat locked.", source, 255, 150, 0, true )
			cancelEvent()
			return
		end
	end	
	if isGuestAccount ( acc ) then return end
	local customTag = getAccountData ( acc, "customTag" )
	if customTag then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox(customTag.." " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: "..customTag.." " .. getPlayerName ( source ) .. ": " .. text)
		
    elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Console")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#ff0000* [ Console ] " .. getPlayerName ( source ) .. ":#FFcc00 " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Console ] " .. getPlayerName ( source ) .. ": " .. text)

    elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Admin - Ex")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#777777* [ Admin - Ex ] " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Admin - Ex ] " .. getPlayerName ( source ) .. ": " .. text)

 elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Admin - At")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#777777* [ Admin - At ] " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Admin - At ] " .. getPlayerName ( source ) .. ": " .. text)

    elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("V.I.P")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#FFcc00* [ V.I.P ]  " .. getPlayerName ( source ) .. ":#ffffff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ V.I.P ] " .. getPlayerName ( source ) .. ": " .. text)

	elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Police")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#007F7F* [ Police ]  " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Police ] " .. getPlayerName ( source ) .. ": " .. text)

	elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 1")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#0593FF* [ Lv.1 ] " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Lv.1 ] " .. getPlayerName ( source ) .. ": " .. text)

	elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 2")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#2554c7* [ Lv.2 ] " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Lv.2 ] " .. getPlayerName ( source ) .. ": " .. text)

	elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 3")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#0FC615* [ Lv.3 ] " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Lv.3 ] " .. getPlayerName ( source ) .. ": " .. text)

	elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 4")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#007000* [ Lv.4 ] " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Lv.4 ] " .. getPlayerName ( source ) .. ": " .. text)

       elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 5")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#FF0000* [ Lv.5 ] " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Lv.5 ] " .. getPlayerName ( source ) .. ": " .. text)


       elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 6")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#CC0000* [ Lv.6 ] " .. getPlayerName ( source ) .. ":#0099cc " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Lv.6 ] " .. getPlayerName ( source ) .. ": " .. text)

       elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Head.Admin")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#C11B17* [ Head.Admin ] " .. getPlayerName ( source ) .. ":#0099cc " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Head.Admin ] " .. getPlayerName ( source ) .. ": " .. text)
	end
end
addEventHandler("onPlayerChat", getRootElement(), chatbox)

 

Link to comment
function chatbox( text, type)
	local acc = getPlayerAccount(source)
	if ChatDisabled then
		if not isGuestAccount ( acc ) then
			if not isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Console")) then 
				outputChatBox ( "Chat locked.", source, 255, 150, 0, true )
				cancelEvent ( ) 
				return 
			end
		else
			outputChatBox ( "Chat locked.", source, 255, 150, 0, true )
			cancelEvent()
			return
		end
	end	
	if ( type == 0 ) then
	if isGuestAccount ( acc ) then return end
	local customTag = getAccountData ( acc, "customTag" )
	if customTag then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox(customTag.." " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: "..customTag.." " .. getPlayerName ( source ) .. ": " .. text)
		
    elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Console")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#ff0000* [ Console ] " .. getPlayerName ( source ) .. ":#FFcc00 " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Console ] " .. getPlayerName ( source ) .. ": " .. text)

    elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Admin - Ex")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#777777* [ Admin - Ex ] " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Admin - Ex ] " .. getPlayerName ( source ) .. ": " .. text)

 elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Admin - At")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#777777* [ Admin - At ] " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Admin - At ] " .. getPlayerName ( source ) .. ": " .. text)

    elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("V.I.P")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#FFcc00* [ V.I.P ]  " .. getPlayerName ( source ) .. ":#ffffff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ V.I.P ] " .. getPlayerName ( source ) .. ": " .. text)

	elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Police")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#007F7F* [ Police ]  " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Police ] " .. getPlayerName ( source ) .. ": " .. text)

	elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 1")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#0593FF* [ Lv.1 ] " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Lv.1 ] " .. getPlayerName ( source ) .. ": " .. text)

	elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 2")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#2554c7* [ Lv.2 ] " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Lv.2 ] " .. getPlayerName ( source ) .. ": " .. text)

	elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 3")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#0FC615* [ Lv.3 ] " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Lv.3 ] " .. getPlayerName ( source ) .. ": " .. text)

	elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 4")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#007000* [ Lv.4 ] " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Lv.4 ] " .. getPlayerName ( source ) .. ": " .. text)

       elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 5")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#FF0000* [ Lv.5 ] " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Lv.5 ] " .. getPlayerName ( source ) .. ": " .. text)


       elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 6")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#CC0000* [ Lv.6 ] " .. getPlayerName ( source ) .. ":#0099cc " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Lv.6 ] " .. getPlayerName ( source ) .. ": " .. text)

       elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Head.Admin")) then
 cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("#C11B17* [ Head.Admin ] " .. getPlayerName ( source ) .. ":#0099cc " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [ Head.Admin ] " .. getPlayerName ( source ) .. ": " .. text)
	end
	end
end
addEventHandler("onPlayerChat", getRootElement(), chatbox)

 

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