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 233 34 35338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Zune5
COMMUNITY BANNED Off Offline

Quote
playa slaya has written
I need help.Icant figure out how to make lua files i downloaded to work.I put them in the sys\lua folder but it doesnt work when i start a map.

You need to activate them in the Server.lua file

Example
Open up the Server.lua in the lua folder

There should be stuff like

-- dofile("sys/lua/exampleforbeginnrs.lua")
Write the lua file that you want in this format
-- dofile("sys/lua/whatyouwant.lua")
Then delete this part --
So to activate
dofile(Activated)
-- dofile(Deactivated)

old Re: Lua Scripts/Questions/Help

KaiserWilhelm
User Off Offline

Quote
mortyr22 has written
how to create bind bind "f" setmaxhealth 1 250 equip 1 72,88,83,3,76


please and thank you would be appreciated!!! Some people have more important things to do (like actually play the game!!!)

old Re: Lua Scripts/Questions/Help

Vibhor
User Off Offline

Quote
Umm how to make temporary triggers like when open a door and after few seconds the door will close
plz answer quickly
and thanks for any help

old Re: Lua Scripts/Questions/Help

playa slaya
COMMUNITY BANNED Off Offline

Quote
Vibhor has written
Umm how to make temporary triggers like when open a door and after few seconds the door will close
plz answer quickly
and thanks for any help


Just make the door trigger a delay make delay for example 5sec. door will then close 5sec. after activated.

old Questions?

chukz15
User Off Offline

Quote
1.How can I make a server that says killing spree monster kill etc.

2.How do I make a server with gun game mode and a server that has diff classes like flamethrower and etc.

old Re: Lua Scripts/Questions/Help

saladface27
User Off Offline

Quote
what about a dom point that is always captured by one team?

edit: you can trigger dom points, when they are triggered they change to the terrorist team. can you trigger it so that changes to the cts instead?

old Re: Lua Scripts/Questions/Help

mortyr22
User Off Offline

Quote
what is wrong?
addhook("hit", "ak47_heal")
function ak47_heal
(id,source,weapon,hpdmg,apdmg)
if (weapon == 30)
parse("equip "..id.." "30)
end
end

old Team Change Spawn

SQ
Moderator Off Offline

Quote
Thats what you wanted?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
-- Array
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i] = 0
	end
	return array
end

-- Valuables
pl_y = initArray(32)
pl_x = initArray(32)

-- Join
addhook("join", "joins")
function joins(p)
	pl_x[p] = 0
end

-- Team Select
addhook("team", "teams")
function teams(id,team)
	if (team > 0) then
		pl_x[id] = player(id,"x")
		pl_y[id] = player(id,"y")
	end
end

--Spawn
addhook("spawn","spawns")
function spawns(id)
	if pl_x[id] > 0 then
		parse("setpos  "..id.." "..pl_x[id].." "..pl_y[id])
		pl_x[id] = 0
	end	
end

old Re: Lua Scripts/Questions/Help

KimKat
GAME BANNED Off Offline

Quote
mortyr22 has written
what is wrong?
addhook("hit", "ak47_heal")
function ak47_heal
(id,source,weapon,hpdmg,apdmg)
if (weapon == 30)
parse("equip "..id.." "30)
end
end
Try this...
1
2
3
4
5
6
addhook("hit","ak47_heal")
function ak47_heal(id,source,weapon,hpdmg,apdmg)
     if(weapon == 30) then
     parse ("sethealth "..id.." "..player(id,"health")+1)
     end
end
Then you will be able to heal with the AK-47, lol.
To the start Previous 1 233 34 35338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview