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 2244 245 246338 339 Next To the start

old Re: Lua Scripts/Questions/Help

StirlizZ-Fapicon
Super User Off Offline

Quote
I have a question: DC fixed bug with setpos in online? It`s not same as setpos command in offline. The game thinking that setpos - moving. but players don`t move.

old Nazi zombies project

Jaso
BANNED Off Offline

Quote
I am currently working on the project nazi zombies for cs2d but i need some help.

To show you what nazi zombies is please take look at this link: http://www.youtube.com/watch?v=FsKdbWNi3cI

Now my big problem is that i cant make rounds because i cant let a delay only activate with at least two triggers or more and if a npc dies it cant do a trigger.
So i need help i need people who can made a lua so that i can let the delay only activate with two triggers and that npc,s can use trigger when dies because when i do more npc,s the problem appears with the rounds.

It would be nice if some one could help thanks.
edited 1×, last 29.08.10 11:18:47 pm

old Re: Lua Scripts/Questions/Help

Doctor Freeman
User Off Offline

Quote
I'm making an autobuy script so guys is this right...

Should I go Code no. 1 or Code no. 2

!.
1
bind "rightshift" "defuser,vesthelm,m4a1,He,deagle"

2.
1
bind "rightshift" "defuser" "vesthelm "m4a1" "He" "deagle"


Guys can you tell me whats the correct I maded because I'm just a newbie in Scripting

old Re: Lua Scripts/Questions/Help

Doctor Freeman
User Off Offline

Quote
Gordon Freeman has written
I'm making an autobuy script so guys is this right...

Should I go Code no. 1 or Code no. 2

!.
1
bind "rightshift" "defuser,vesthelm,m4a1,He,deagle"

2.
1
bind "rightshift" "defuser" "vesthelm "m4a1" "He" "deagle"


Guys can you tell me whats the correct I maded because I'm just a newbie in Scripting


Please Somebody HELP ME!!!

Reply Pleaze!...

old Re: Lua Scripts/Questions/Help

Doctor Freeman
User Off Offline

Quote
Flacko has written
Code 1
You wouldn't have died by trying both of them, though...


hey flacko don't worry about that because I figured it out for 48 sec. , but what is the name of nightvision is it "nvg" or "nightvision"

old Re: Lua Scripts/Questions/Help

GreenDevil
User Off Offline

Quote
Hi all, i'm know i'm dumb but i don't know with it isn'T working!

1
2
3
4
5
6
addhook("always","test")
function test(id,text)
	if ai_say(id,text) then
	(text=="Testing Ai_Say")
	end
end

Can anybody help me with this.

Please Attention:
I looked in bots folder and includes but didn't found anything that has function 'ai_say'!

old Re: Lua Scripts/Questions/Help

wero
User Off Offline

Quote
I need script that makes this kamikaze work only for team1.
Asking again, because no one did not answer


Spoiler >

old Re: Lua Scripts/Questions/Help

Cure Pikachu
User Off Offline

Quote
Hope this works...
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
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i]=0
	end
	return array
end
kamikaze=initArray(32)

addhook("serveraction","kamikaze_button")
function kamikaze_button(id,action)
	if action == 1 and player(id,"team") == 1 then
		if kamikaze[id] == 0 then
			kamikaze[id]=1
			parse("strip "..id)
			parse("speedmod "..id.." 25")
			msg("©255255255"..player(id,"name").." Uses KAMIKAZE!!!")
		else
		return 0
		end
	end
end

addhook("second","kamikaze_timer")
function kamikaze_timer()
	for i = 1, 32 do
		if kamikaze[i] == 1 then
			msg2(i,"3@C")
			kamikaze[i]=2
		elseif kamikaze[i] == 2 then
			msg2(i,"2@C")
			kamikaze[i]=3
		elseif kamikaze[i] == 3 then
			msg2(i,"1@C")
			kamikaze[i]=4
		elseif kamikaze[i] == 4 then
			msg2(i,"EXPLOSION!!!@C")
			parse("explosion "..player(i,"x").." "..player(i,"y").." 100 9999 "..i)
			parse("killplayer "..i)
			kamikaze[i]=0
		end
	end
end

addhook("movetile","kamikaze_effect")
function kamikaze_effect(id,x,y,tilex,tiley)
	if kamikaze[id] > 0 then
		parse("effect \"fire\" "..player(id,"x").." "..player(id,"y").." 10 10 0 25 255")
	end
end

addhook("minute","kamikaze_msg")
function kamikaze_msg()
	msg("©255255255Press F2 to use KAMIKAZE!!!")
end

old Re: Lua Scripts/Questions/Help

TimeQuesT
User Off Offline

Quote
MeGaEdIIToRMaN has written
Hi all, i'm know i'm dumb but i don't know with it isn'T working!

1
2
3
4
5
6
addhook("always","test")
function test(id,text)
	if ai_say(id,text) then
	(text=="Testing Ai_Say")
	end
end

Can anybody help me with this.

Please Attention:
I looked in bots folder and includes but didn't found anything that has function 'ai_say'!


you want to know how ai_say work?
it works so :

ai_say (aiid,"some text")

old Re: Lua Scripts/Questions/Help

Blacko
User Off Offline

Quote
Hi all, I need a little script but I don't know how make it !
I want a script who creates wings when we say for example : !angel ...
Naturally I have wings in my file which is named iDios and my wings have the name: bal2...
Then I want the same script but only for the CT and now a police car, a file iDios and the name of picture : police ...
Please help me !
Thanks you a lot !
edited 1×, last 30.08.10 06:18:01 pm

old Re: Lua Scripts/Questions/Help

RyceR
User Off Offline

Quote
if anyone can do for me noclip without penetration through walls like in gmod?
Here is a version of the infiltration:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
noclip = initArray( 32)

addhook( "always", "al")
function al()
	for id = 1, 32 do
		if noclip[ id] == 1  then
			local x, y, rot
			x = player( id, "x")
			y = player( id, "y")
			rot = math.rad( player( id, "rot")-90)
			x = x + math.cos( rot) * 7
			y = y + math.sin( rot) * 7
			parse('setpos '.. id ..' '.. x ..' '.. y)
		end
	end
end

sorry for my bad english

old Re: Lua Scripts/Questions/Help

Evool
User Off Offline

Quote
Hi, i have script from fehuziom - door only for "USGN". All OK, but i want write several USGNs. Adding usgns after the comma no work.

1
2
3
4
5
6
7
8
9
addhook("usebutton","use")
function use(id,x,y)

     if (x==7) and (y==7) then
          if player(id,"usgn")==15587 then
               parse("trigger cgt")
          end
     end
end
Sorry for my bad english.

old Re: Lua Scripts/Questions/Help

Cure Pikachu
User Off Offline

Quote
Tried this yet?
1
2
3
4
5
6
7
8
9
10
11
12
list = {} -- Put the US.de IDs here. Seperated by commas or semi-colons

addhook("usebutton","use")
function use(id,x,y)
	if (x==7) and (y==7) then
		for _, usgn in ipairs(list) do
			if player(id,"usgn") == usgn then
				parse("trigger cgt")
			end
		end
	end
end
To the start Previous 1 2244 245 246338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview