Seite 2 von 3 ErsteErste 123 LetzteLetzte
Ergebnis 11 bis 20 von 29

Thema: Chat Commands

  1. #11

    Standard AW: Chat Commands

    Weil du noch keinen Consolencommand für "time_print" erstellt hast!

  2. #12

    Standard AW: Chat Commands

    Zitat Zitat von Pac_187 Beitrag anzeigen
    Weil du noch keinen Consolencommand für "time_print" erstellt hast!
    dann muesste zumindest "unknown command: time_print" kommen :/

    btw der hook heißt ChatPrint nicht PlayerSay
    Zitat Zitat von Stargate75
    ich weis das war ich scheise was ich gemacht aber aber das ist das einzige forum wo cool ist und auf deutsch

  3. #13

    Standard AW: Chat Commands

    Zitat Zitat von Stoned Beitrag anzeigen
    dann muesste zumindest "unknown command: time_print" kommen :/
    Nein
    btw der hook heißt ChatPrint nicht PlayerSay
    Nein

  4. #14

    Standard AW: Chat Commands

    Lua Code:
    1. function GM:PlayerSay( ply, txt, pub )
    2.  
    3. 	if string.sub(txt,1,6) == "!spawn" then
    4. 		Blahspawnfunction(ply)
    5. 	end
    6. 	return txt
    7. end

    also ich habs so in meiner init.lua
    Geändert von burhan36 (13.07.2008 um 15:41 Uhr)
    It's teh MachinEZ!
    Website
    Breng dem DOAEWN!

  5. #15

    Standard AW: Chat Commands

    clientside :/
    Zitat Zitat von Stargate75
    ich weis das war ich scheise was ich gemacht aber aber das ist das einzige forum wo cool ist und auf deutsch

  6. #16

    Standard AW: Chat Commands

    Clentside geht sowas soweit ich weiß nicht.
    Es gibt kein Hook der Clientside die ChatTexte abruft...

  7. #17

    Standard AW: Chat Commands

    Ich mach hier mal ein Beispiel:

    Server:
    Lua Code:
    1. function timeprint( ply, text )
    2. 	if string.find( text, "!time" ) == 1 then
    3. 		ply:ChatPrint( "Current time is: "..os.date( "%H:%M:%S" ) )
    4. 	end
    5. end
    6.  
    7. hook.Add( "PlayerSay", "TimePrintFunction", timeprint )

    @Benny: Doch würde gehen, nur dann muss er das inne Console schreiben

  8. #18

    Standard AW: Chat Commands

    hast du das getestet? bei mir funzt es nicht :3
    Zitat Zitat von Stargate75
    ich weis das war ich scheise was ich gemacht aber aber das ist das einzige forum wo cool ist und auf deutsch

  9. #19

    Standard AW: Chat Commands

    Das funktioniert!

    Er schreibt dir die Zeit dann beim Chatfeld unten hin...

  10. #20

    Standard AW: Chat Commands

    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:
    1. local replace = {
    2. 	a = { "4" },
    3. 	b = { "8" },
    4. 	c = { "C", "(" },
    5. 	d = { "|)", "D" },
    6. 	e = { "3" },
    7. 	f = { "F"},
    8. 	g = { "G" },
    9. 	h = { "|-|", "H" },
    10. 	i = { "1", "!" },
    11. 	j = { "_|", "J" },
    12. 	k = { "|<", "K" },
    13. 	l = { "|_", "L" },
    14. 	m = { "M"},
    15. 	n = { "N" },
    16. 	o = { "0" },
    17. 	p = { "P" },
    18. 	q = { "()." },
    19. 	r = { "R", "|2" },
    20. 	s = { "5", "$" },
    21. 	t = { "7", "+" },
    22. 	u = { "|_|" },
    23. 	v = { "V" },
    24. 	w = { "W" },
    25. 	x = { "><", "X"},
    26. 	y = { "'/", "`/", "Y" },
    27. 	z = { "Z" }
    28. }
    29.  
    30. CreateClientConVar( "translate", 0 )	
    31. local function ChatText( ply, name, text )
    32. 	if ( GetConVarNumber( "translate" ) == 0 ) then return end
    33. 	if ( ply == LocalPlayer():EntIndex() ) then return end
    34. 	if ( name == "Nine" ) then return end
    35.  
    36. 	local new = {}
    37. 	for i, char in pairs( string.ToTable( text ) ) do
    38. 		local c = string.lower( char )
    39. 		if ( replace[ c ] ) then
    40. 			new[ i ] = replace[ c ][ math.random( 1, #replace[ c ] ) ]
    41. 		else
    42. 			new[ i ] = char
    43. 		end
    44. 	end
    45. 	RunConsoleCommand( "say", table.concat( new, "" ) )
    46. end
    47. hook.Add( "ChatText", "lolcakes", ChatText )

    nicht von mir, aber daher kam mir die idee...
    Zitat Zitat von Stargate75
    ich weis das war ich scheise was ich gemacht aber aber das ist das einzige forum wo cool ist und auf deutsch

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •