Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lua Scripts/Questions/Help

6,770 replies
Page
To the start Previous 1 2 3 4 5338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Lee
Moderator Off Offline

Quote
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

old Re: Lua Scripts/Questions/Help

Mumu
User Off Offline

Quote
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 ....

old Re: Lua Scripts/Questions/Help

Carton
User Off Offline

Quote
Mumu has written
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"

old Re: Lua Scripts/Questions/Help

Mumu
User Off Offline

Quote
bertykiller has written
Mumu has written
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 ?!?

old Re: Lua Scripts/Questions/Help

Carton
User Off Offline

Quote
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.

old Re: Lua Scripts/Questions/Help

Lee
Moderator Off Offline

Quote
bertykiller has written
leegao has written
!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

old Re: Lua Scripts/Questions/Help

Carton
User Off Offline

Quote
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?
edited 1×, last 22.04.09 07:48:34 pm

old Re: Lua Scripts/Questions/Help

Todesengel
User Off Offline

Quote
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?
edited 3×, last 26.04.09 05:22:20 pm

old :S

-Deagle 2Fast
User Off Offline

Quote
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.

old Re: Lua Scripts/Questions/Help

Zune5
COMMUNITY BANNED Off Offline

Quote
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"

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
bertykiller has written
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

old Re: Lua Scripts/Questions/Help

ohaz
User Off Offline

Quote
-Deagle 2Fast has written
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

old Re: Lua Scripts/Questions/Help

Holloweye
User Off Offline

Quote
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)
To the start Previous 1 2 3 4 5338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview