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 2209 210 211338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

Starkkz
Moderator Off Offline

Zitieren
Not very well

1
2
3
4
5
6
7
addhook("hit","laser_heal")
function laser_heal(id,source,wpn,hpdmg,apdmg)
	if wpn == 45 then
		parse("sethealth "..id.." "..player(id,"health")+30)
		return 1
	end
end

alt Re: Lua Scripts/Questions/Help

Homer
User Off Offline

Zitieren
@Kenv
Spoiler >

This is probably bugged, but this is the general idea I think how on to do this.

And Question, Would this tid bit be a metatable?
1
2
3
tbl = {value = 23, tbl2 = {45,44}}
--or
tbl = {{value = 1},{value = 2}}
Or would none of those be examples of a metatable.

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
Homer hat geschrieben
And Question, Would this tid bit be a metatable?
1
2
3
tbl = {value = 23, tbl2 = {45,44}}
--or
tbl = {{value = 1},{value = 2}}
Or would none of those be examples of a metatable.


No, those are just tables inside tables, not metatables.
http://www.lua.org/pil/13.html

alt Re: Lua Scripts/Questions/Help

Homer
User Off Offline

Zitieren
Oh thanks
And one more question please, I've been baffled as to what these patterns are such as %s and %b. I see good stuff done with it, so I was curious as to what they are. Thanks
1× editiert, zuletzt 20.06.10 01:53:45

alt Explosion gun

KenVo
User Off Offline

Zitieren
Can someone tell me how to make any gun to explode when it hit any player?
Well, i just know how to make exploding snowball

1
2
3
4
5
6
7
8
9
10
11
function explosion(x, y, size, damage)
     parse("explosion "..x.." "..y.." "..size.." "..damage)
end


addhook("projectile","my_projectile")
function my_projectile(id,weapon,x,y)
	if(weapon == 32) then --snowball
		explosion(x,y,300, 300) -- size + damage = 300
	end
end

alt Re: Lua Scripts/Questions/Help

KenVo
User Off Offline

Zitieren
what wrong with this ?

1
2
3
4
5
6
addhook("hit","my_hit")
function my_hit(id,source,weapon,hpdmg,apdmg)
	if(weapon == 32) then --M4a1
		explosion(x,y,50, 45) -- size + damage = 30
	end
end

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
addhook("hit","my_hit")
function my_hit(id,source,weapon,hpdmg,apdmg)
	if(weapon == 32) then --M4a1
		local x = player(id,"x")
		local y = player(id,"y")
		explosion(x,y,50, 45) -- size + damage = 30
	end
end

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
He had a function in his script, he posted it above
1
2
3
function explosion(x, y, size, damage)
parse("explosion "..x.." "..y.." "..size.." "..damage)
end

alt Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

Zitieren
Flacko hat geschrieben
He had a function in his script, he posted it above
1
2
3
function explosion(x, y, size, damage)
parse("explosion "..x.." "..y.." "..size.." "..damage)
end


Oops... sorry, didn't mention

alt GC Script help please

secritek
User Off Offline

Zitieren
hi, me and bully are making mod global conflict and we need someone who can make a script like Domination. If you die you can respawn but you must wait 6 seconds before respawning. And name before map (De_, Dom_, Dm_) must be gc_ . Please can anyone help and try it for us? I am not scripter :(. Thanks for anyone who will try it.
EDIT : i forgot something, if you will be done please write a message to me and i will give you e-mail thank you.

alt Re: Lua Scripts/Questions/Help

KenVo
User Off Offline

Zitieren
Spoiler >


It's working but.......

IMG:https://img683.imageshack.us/img683/8757/zmstreet00000.jpg

alt Re: Lua Scripts/Questions/Help

ohaz
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
addhook("hit","my_hit")
function my_hit(id,source,weapon,hpdmg,apdmg)
	if(weapon == 35) then
		local x = player(id,"x")
		local y = player(id,"y")
		parse("explosion "..x.." "..y.." 25 5000 "..source)
		return 1
	end
end

alt Re: Lua Scripts/Questions/Help

Echo-Charlie
User Off Offline

Zitieren
Hi scripters. I have one Question:
It is possible to get player skin like player(p,"team")? I think it is not, but better it hear that from others.
Zum Anfang Vorherige 1 2209 210 211338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht