Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Lua Scripts/Questions/Help

6.770 Antworten
Seite
Zum Anfang Vorherige 1 2 3 4 5338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

Lee
Moderator Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook("say","sdz.say")
function sdz.say(id, message)
	local i = tonumber(message:sub(5))
	if not i then i = id end
	if not player(i, "exists") then i = id end
	-- FREEZE/DEFREEZE PLAYER
	if message=="!frz" then
		vav=player(id, "speedmod")
		parse("speedmod "..id.." -100")	
	end
	if message=="!dfrz" then
		parse("speedmod "..id.. " vav")	
	end
	return 1
end

alt Re: Lua Scripts/Questions/Help

Mumu
User Off Offline

Zitieren
I don't know anyting about scripting ... I just want to ask this Q.:

Can a script be made that sets the Fog of War Alpha to 100% ?

I am asking this becouse it will be very nice to use this script on zombie mode ...

Tnx in advance ....

alt Re: Lua Scripts/Questions/Help

Carton
User Off Offline

Zitieren
Mumu hat geschrieben
I don't know anyting about scripting ... I just want to ask this Q.:

Can a script be made that sets the Fog of War Alpha to 100% ?

I am asking this becouse it will be very nice to use this script on zombie mode ...

Tnx in advance ....

Precise, you want you or all the players?
else there is a command script, not lua :
"fowalpha 100"

alt Re: Lua Scripts/Questions/Help

Mumu
User Off Offline

Zitieren
bertykiller hat geschrieben
Mumu hat geschrieben
I don't know anyting about scripting ... I just want to ask this Q.:

Can a script be made that sets the Fog of War Alpha to 100% ?

I am asking this becouse it will be very nice to use this script on zombie mode ...

Tnx in advance ....

Precise, you want you or all the players?
else there is a command script, not lua :
"fowalpha 100"

For all the players.

Cold someone cold be so nice to post it here ?!?

alt Re: Lua Scripts/Questions/Help

Carton
User Off Offline

Zitieren
1
2
3
addhook("spawn","fow")
function fow()
	parse("fowalpha "..100)

Try this.
Note i don't know if it's you or all player will be FOW alpha to 100. Ask it to player.

alt Re: Lua Scripts/Questions/Help

Lee
Moderator Off Offline

Zitieren
bertykiller hat geschrieben
leegao hat geschrieben
!freeze ID

sorry but this code don't work.
What is
1
tonumber(message:sub(5))


make sure that the message is not nil and that you've actually typed in a number into the !frz command. If you need to debug add print(i) after the line

alt Re: Lua Scripts/Questions/Help

Carton
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook("say","sdz.say")
function sdz.say(id, message)
	-- SEARCH ID PLAYER
	i = tonumber(message:sub(5))
	-- FREEZE/DEFREEZE PLAYER
	if (message=="!frz"..i) then
		vav=player(i, "speedmod")
		parse("speedmod "..i.." -100")  
		return 1
	end
	if (message=="!drz"..i) then
		parse("speedmod "..i.." vav")
		return 1
	end
end
This code word perfectly, thanks to lee!
Is it possible to create a box which give an item at the same box position when she is brocken with lua?
1× editiert, zuletzt 22.04.09 19:48:34

alt Re: Lua Scripts/Questions/Help

Todesengel
User Off Offline

Zitieren
Hey, i have a very difficult question ..

i want to create a roleplayscript but i cant make a menu what i open with a "trigger_use"

Can me make a player a sample to this?
3× editiert, zuletzt 26.04.09 17:22:20

alt :S

-Deagle 2Fast
User Off Offline

Zitieren
I'm really confused...

When I downloaded Lua 5.1.4 it note block
it opened on. I looked for tutorials, there I
saw the guy was writing in note block..

A note block called "Script" o.o

I didn't understand anything. Is there a
program for Lua or is it just writing by myself?

I really need answer.

alt Re: Lua Scripts/Questions/Help

Zune5
COMMUNITY BANNED Off Offline

Zitieren
1. You use notepad to do your work.
2. When saving your work, Go to Save as
3. Now when saving this, at the bottom there is something that says ".txt" Text Document.
4. Change this to "All Files"
5. Save your file as a .lua. Like "leerocks.lua"

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
bertykiller hat geschrieben
This code word perfectly, thanks to lee!
Is it possible to create a box which give an item at the same box position when she is brocken with lua?


You could spawn the items you want at the breakable's position on every roundstart

alt Re: Lua Scripts/Questions/Help

ohaz
User Off Offline

Zitieren
-Deagle 2Fast hat geschrieben
Which kind of editor? Is it changse to give me a download link or something?

(sorry that im new at lua)
The normal windows editor (notepad like Zune5 said) is enough. If you want you can download special Lua editors which highlight the syntax of lua, but that's not important

alt Re: Lua Scripts/Questions/Help

Holloweye
User Off Offline

Zitieren
1: Is there any command or lua script to force a player to change team?

2: Is there any command or lua script to remove the c4 in the game? (I have tried with "parse("strip "..p.." "..5)" it dont work)
Zum Anfang Vorherige 1 2 3 4 5338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht