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 221 22 23338 339 Next To the start

old Re: Lua Scripts/Questions/Help

RAVENOUS
BANNED Off Offline

Quote
I'm an idiot.

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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
--------------------------------------------------
-- UT+Quake Sounds Script by Unreal Software    --
-- 22.02.2009 - www.UnrealSoftware.de           --
-- Adds UT and Quake Sounds to your Server      --
--------------------------------------------------

if sample==nil then sample={} end
sample.ut={}

-----------------------
-- INITIAL SETUP     --
-----------------------
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i]=0
	end
	return array
end
sample.ut.timer=initArray(32)
sample.ut.level=initArray(32)
sample.ut.fblood=0


-----------------------
-- PREPARE TO FIGHT! --
-----------------------
addhook("startround","sample.ut.startround")
function sample.ut.startround()
	parse("sv_sound \"fun/prepare.wav\"")
	sample.ut.fblood=0
end


-----------------------
-- KILL SOUNDS+MSGS  --
-----------------------
addhook("kill","sample.ut.kill")
function sample.ut.kill(killer,victim,weapon)
	if (os.clock()-sample.ut.timer[killer])>999999 then
		sample.ut.level[killer]=0;
	end
	level=sample.ut.level[killer]
	level=level+1
	sample.ut.level[killer]=level
	sample.ut.timer[killer]=os.clock()
	-- FIRST BLOOD?
	if (sample.ut.fblood==0) then
		sample.ut.fblood=1
		parse("sv_sound \"fun/firstblood.wav\"");
		msg (player(killer,"name").." sheds FIRST BLOOD by killing "..player(victim,"name").."!")
	end
	-- HUMILIATION? (KNIFEKILL)
	if (weapon==50) then
		-- HUMILIATION!
		parse("sv_sound \"fun/humiliation.wav\""); 
		msg (player(killer,"name").." humiliated "..player(victim,"name").."!")
	else
		-- REGULAR KILL
		if (level==1) then
			-- Single Kill! Nothing Special!
		elseif (level==2) then
			parse("sv_sound \"fun/doublekill.wav\"");
			msg (player(killer,"name").." made a Doublekill!")
		elseif (level==3) then
			parse("sv_sound \"fun/multikill.wav\"")
			msg (player(killer,"name").." made a Multikill!")
		elseif (level==4) then
			parse("sv_sound \"fun/ultrakill.wav\"")
			msg (player(killer,"name").." made an ULTRAKILL!")
		elseif (level==5) then
			parse("sv_sound \"fun/monsterkill.wav\"")
			msg (player(killer,"name").." made a MO-O-O-O-ONSTERKILL-ILL-ILL!")
		else
			parse("sv_sound \"fun/unstoppable.wav\"")
			msg (player(killer,"name").." is UNSTOPPABLE! "..level.." KILLS!")
		end
	end
end

Can somebody please edit this script that after a player dies, his level is 0 again?

old Re: Lua Scripts/Questions/Help

Zune5
COMMUNITY BANNED Off Offline

Quote
Vibhor has written
Is there an script which allow you to make infinite dispensers but not the other Buildings like turrets and supply


Quite easy.

parse("mp_building_limit Dispenser 1000000")
parse("mp_building_limit Turret 1")

You get the point.

old Re: Lua Scripts/Questions/Help

wups
User Off Offline

Quote
1
2
3
4
addhook("die","explode")
function explode(v,k,w,x,y)
parse("explosion "..x.." "..y.." 100 100 "..v)
end

@Skipper

I have posted what you should do.
It's not hard.

old Re: Lua Scripts/Questions/Help

RAVENOUS
BANNED Off Offline

Quote
But I don't know this f***in' die command:

[code]if (die) then sample.ut.level[playerid]=0

end[code]

But it don't function, I never worked with "die".

old Re: Lua Scripts/Questions/Help

younes
COMMUNITY BANNED Off Offline

Quote
i 've just thought of a pretty nive idea for lua and building,but i cant make it coz i suck in lua so i need some help or somone to make it:
could somebody please make a lua which could speed up upgrading and reparing in cs2d or make a lua menu or lua which could build directly tripple turrts
edited 1×, last 01.07.09 04:27:06 pm

old Re: Lua Scripts/Questions/Help

Admin
User Off Offline

Quote
Needing a proffesional scripter for a new game Check the projects forum and look for New Game. It is Called Eminent.

P.S: Blazingxx U Rock at Lua Scripting

(.=CS=.)

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
Admin has written
look for New Game.


Is your request for lua?
Or for other programming language.
I think you are talking not about "Lua".

@Admin. Isnt your other nick Leo7755 on www.unrealsoftware.de ?
edited 1×, last 01.07.09 10:44:11 pm

old doznt work :(

younes
COMMUNITY BANNED Off Offline

Quote
@wups
i tryde smthin but it didnt work, could you help me with it (tell me whats wrong pls)
origina script:
1
2
3
4
5
6
7
8
9
addhook("build","no_site")
function no_site(id)
	return 1
end

addhook("build","no_sitenow")
function no_sitenow(id,type,x,y)
	parse("spawnobject "..type.." "..x.." "..y.." 90 1 "..player(id,"team").." "..id)
end
what i tryde:
1
2
3
4
5
6
7
8
9
addhook("build","no_upgrade")
function no_upgrade(id)
	return 1
end

addhook("build","no_upgradenow")
function no_sitenow(id,type,x,y)
	parse("spawnobject "..type.." "..x.." "..y.." 90 1 "..player(id,"team").." "..id)
end
all i did was changing the
1
no_site
bye
1
no_upgrade
and i'm so not shur that it works
To the start Previous 1 221 22 23338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview