Forum
CS2D General Lua scriptingLua scripting
31 Antwortentry this:
http://www.unrealsoftware.de/forum_posts.php?post=134069&start=0#post134069
2. Notepad (Enough this program)
wolfteam32 hat geschrieben
How to do a sound when im write a text !double .
Try this :
1
2
3
4
2
3
4
addhook("say","sayfuncs") function sayfuncs(p,txt) 	if (txt=="double") then parse("sv_sound \"env/mystery.wav\""); end end
Edit: That doesnt work!!!
1× editiert, zuletzt 01.07.09 21:24:16
wolfteam32 hat geschrieben
Thx U sooo match
Edit: That doesnt work!!!
Edit: That doesnt work!!!
I made not !double but double.
without >!<
Its working for me.
Just edit one simbol
1
2
3
4
2
3
4
addhook("say","sayfuncs") function sayfuncs(p,txt) 	if (txt=="!double") then parse("sv_sound \"env/mystery.wav\""); end end
1
2
3
4
5
6
2
3
4
5
6
addhook("say","sayfuncs") function sayfuncs(p,txt) 	if (txt=="!double") then 		parse("sv_sound \"env/mystery.wav\"") 	end end
edit://
slow
1× editiert, zuletzt 02.07.09 10:41:22
1
2
3
4
2
3
4
addhook("say","sayfuncs") function sayfuncs(p,txt) 	if (txt=="!double") then parse("sv_sound \"env/mystery.wav\""); end end
wolfteam32 hat geschrieben
there is nothing error......
it's work for me, just paste your script here.. we see what the problem
First of all the text is rigged. How can it work for anyone?
if (txt=="!double") then parse("sv_sound \"env/mystery.wav\""); end
First of all, what is ; doing in there? Did you mistake it with pascal or something?
Second is the parse...
Okay let's see it as a text. It's "sv_sound \" as a text. Then you just write env/mystery.wav\ without the ..'s, I don't know why, and then you just put useless "" tags that open/close instantly. Am I not getting something here?
1
http://rapidshare.com/files/250970959/server.lua.lua.html
1× editiert, zuletzt 02.07.09 13:57:16
You can use ; end
wolfthread, paste the server.lua at www.pastebin.com.
And not upload it.
1× editiert, zuletzt 02.07.09 14:08:53
Why file name is "server.lua.lua"
lua.lua
Do you have that sound?