Weil du noch keinen Consolencommand für "time_print" erstellt hast!
Zitat von Stargate75
Lua Code:
function GM:PlayerSay( ply, txt, pub ) if string.sub(txt,1,6) == "!spawn" then Blahspawnfunction(ply)end
return txt
end
also ich habs so in meiner init.lua
Geändert von burhan36 (13.07.2008 um 15:41 Uhr)
clientside :/
Zitat von Stargate75
Clentside geht sowas soweit ich weiß nicht.
Es gibt kein Hook der Clientside die ChatTexte abruft...
Ich mach hier mal ein Beispiel:
Server:
Lua Code:
function timeprint( ply, text ) if string.find( text, "!time" ) == 1 then ply:ChatPrint( "Current time is: "..os.date( "%H:%M:%S" ) )end
end
hook.Add( "PlayerSay", "TimePrintFunction", timeprint )
@Benny: Doch würde gehen, nur dann muss er das inne Console schreiben![]()
hast du das getestet? bei mir funzt es nicht :3
Zitat von Stargate75
ich hab keinen server dh bringt mir das nix :/ ich will es clientside, hier ist n aehnlicher code...der liest den chat und replaced ihn mit was andrem...
Lua Code:
local replace = { a = { "4" }, b = { "8" }, c = { "C", "(" }, d = { "|)", "D" }, e = { "3" }, f = { "F"}, g = { "G" }, h = { "|-|", "H" }, i = { "1", "!" }, j = { "_|", "J" }, k = { "|<", "K" }, l = { "|_", "L" }, m = { "M"}, n = { "N" }, o = { "0" }, p = { "P" }, q = { "()." }, r = { "R", "|2" }, s = { "5", "$" }, t = { "7", "+" }, u = { "|_|" }, v = { "V" }, w = { "W" }, x = { "><", "X"}, y = { "'/", "`/", "Y" }, z = { "Z" }}
CreateClientConVar( "translate", 0 ) local function ChatText( ply, name, text ) if ( GetConVarNumber( "translate" ) == 0 ) then return end if ( ply == LocalPlayer():EntIndex() ) then return end if ( name == "Nine" ) then return end local new = {} for i, char in pairs( string.ToTable( text ) ) do local c = string.lower( char ) if ( replace[ c ] ) then new[ i ] = replace[ c ][ math.random( 1, #replace[ c ] ) ]else
new[ i ] = charend
end
RunConsoleCommand( "say", table.concat( new, "" ) )end
hook.Add( "ChatText", "lolcakes", ChatText )
nicht von mir, aber daher kam mir die idee...
Zitat von Stargate75