Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Lua Scripts/Questions/Help

6.770 Antworten
Seite
Zum Anfang Vorherige 1 281 82 83338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

Crazyx
User Off Offline

Zitieren
Blazzingxx hat geschrieben
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?"

alt Re: Lua Scripts/Questions/Help

Alpha Beta
User Off Offline

Zitieren
-WiLSoN- hat geschrieben
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)

alt Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

DC
Admin Off Offline

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

alt Re: Lua Scripts/Questions/Help

lol93
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

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

alt Re: Lua Scripts/Questions/Help

Heartless Soldier
User Off Offline

Zitieren
-WiLSoN- hat geschrieben
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...
1× editiert, zuletzt 07.11.09 18:04:56

alt Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Zitieren
@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

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
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 ( )

alt Re: Lua Scripts/Questions/Help

were50
User Off Offline

Zitieren
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! |-(|:^)

alt Re: Lua Scripts/Questions/Help

lol93
User Off Offline

Zitieren
N-B-K hat geschrieben
-WiLSoN- hat geschrieben
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.

alt Re: Lua Scripts/Questions/Help

Vibhor
User Off Offline

Zitieren
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
Zum Anfang Vorherige 1 281 82 83338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht