Hi Leute, ich hab es schon so oft probiert, aber ich krieg die Variante einfach nicht hin mein Script zu fixxen.
Ich hoffe mir könnte jemand helfen (Error in der Überschrift)
Code:
Lua
local function playerChat(message, messageType)
if messageType == 0 then
cancelEvent()
local acc = getPlayerAccount(source)
if not isGuestAccount(acc) then
if getAccountData(acc,"chatc") and getElementData(source, "Vip") == true then
local color = getAccountData(acc,"chatc")
local name = getPlayerName ( source )
local team = getPlayerTeam ( source )
for _, player in ipairs ( getElementsByType ( "player" ) ) do
if ( getPlayerTeam ( player ) == team ) then
outputChatBox(name ..": "..color..""..message, root, 255, 255, 255, true )
else
outputChatBox(name ..": #FFFFFF"..message, root, 255, 255, 255, true )
end
else
outputChatBox(name ..": #FFFFFF"..message, root, 255, 255, 255, true )
end
end
outputServerLog("CHAT: "..getPlayerName(source)..": "..message)
end
end
end
addEventHandler("onPlayerChat", root, playerChat)
Alles anzeigen