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 281 82 83338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Crazyx
User Off Offline

Quote
Blazzingxx has written
xeNium,
Use parse() function

1
parse('mp_building_limit Dispenser 9999999')


Oh, I explained myself in a wrong way.
I meant: "Do I need to add any hook?"

old Re: Lua Scripts/Questions/Help

Alpha Beta
User Off Offline

Quote
-WiLSoN- has written
please can someone tell me what are wrappers and what's its function ? thanks

Imagine you want to execute this code in lua:
1
parse("setscore 1 1337")

A wrapper makes this easier. When you include wrapper.lua, you can write this instead:
1
setscore(1,1337)

In wrapper.lua are tons of "functions" that can make programming easier.
(Almost every programming language has functions)

old Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Quote
heh thanks heavy
but another question:
this works for every command ??
i mean if it works for
e.g mp_autoteambalance,mp_infammo,sv_friendlydfire,etc

old Re: Lua Scripts/Questions/Help

DC
Admin Off Offline

Quote
no, only with the commands you can find in wrapper.lua of course. there is no magic or secret.
just open wrapper.lua and try to understand.

old Re: Lua Scripts/Questions/Help

lol93
User Off Offline

Quote
hi i need help i am trying to make a super hero script + a exp script.
and if a player breaks a env_breakble then it the player gets 25 exp how can i make this?

bijv:
evn_breakble
name: wall
trigger: exp

old Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Quote
Blazzingxx already made a super hero script...
i dont understand why to destroy an env_breakble when you can kill people

old Re: Lua Scripts/Questions/Help

Heartless Soldier
User Off Offline

Quote
-WiLSoN- has written
Blazzingxx already made a super hero script...
i dont understand why to destroy an env_breakble when you can kill people


because i think he wants to make "creatures"(NPCs), like a rol game, to train ur player...
edited 1×, last 07.11.09 06:04:56 pm

old Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Quote
@N-B-K oh ok
@anybody
help me with this:
1
2
3
4
5
6
7
8
9
10
11
12
13
function kills(victim,id,wpn,hp,ap)
	local s
	for s = 1, 10 do
		local p
		for p= 1, 7 do
			if (player(vic,class) == [s] then
				if (player(p,class) == [p] then
				--rest of the script--
				end
			end
		end
	end
end
i keep getting this error:
lua error: dir:55: unexpected symbol near "["
what am i doing wrong ?
do u need rest of script ?
thx

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
function kills(victim,id,wpn,hp,ap)
	local s
	for s = 1, 10 do
		local p
		for p= 1, 7 do
			if (player(vic,class) == [s][b])[/b] then
				if (player(p,class) == [p][b])[/b] then
					rest of the script--
				end
			end
		end
	end 
end

Better check symbols like ( )

old Re: Lua Scripts/Questions/Help

Admir
User Off Offline

Quote
1
2
if (player(vic,class) == [s] ) then
if (player(p,class) == [p] ) then

EDIT:
Blazzingxx faster than me

old Re: Lua Scripts/Questions/Help

were50
User Off Offline

Quote
Can someone help me with lua scripting? I have no clue what any of this "hook" or whatever means... I own a clan and want to run a dedicated server (idk how to do that either but ill figure it out) with an admin script. I've downloaded a couple lus scripts and used them but I have NO clue on making them.

Sorry if I break any rules this is my first post.

Peace and thank you! |-(|:^)

old Re: Lua Scripts/Questions/Help

lol93
User Off Offline

Quote
N-B-K has written
-WiLSoN- has written
Blazzingxx already made a super hero script...
i dont understand why to destroy an env_breakble when you can kill people


because i think he wants to make "creatures"(NPCs), like a rol game, to train ur player...

yea i wanne make this any idee Blazzingxx, ur script is for players not for wall's
btw i use ur script and i am editing it.

old Re: Lua Scripts/Questions/Help

Vibhor
User Off Offline

Quote
Is there a special script by which i can't damage players by a weapon but can damage only buildings?
i want to do this with knife
To the start Previous 1 281 82 83338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview