Forum

> > CS2D > Scripts > Healing player from the list
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Healing player from the list

9 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt geschlossen Healing player from the list

Ayudon
User Off Offline

Zitieren
Hi again, im back LOL! I was just looking for a script that.. well, an example:
If a player joins the server with the usgn #12345 (previously listed in lua), then that player can be healed if being hit by a wrench! (+3 hp per hit).
That was all

alt Re: Healing player from the list

Dovahkin
User Off Offline

Zitieren
Here i hope it works for you

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
citizen={43653} -- and the people who come before please write it here.

addhook("join","lolz")
function lolz(id)
	for _,usgn in ipairs (citizen) do
		if player(id,'usgn') == usgn then
			msg (player(id,"name").." is back!@C")
		end
	end
end

addhook("hit","lol")
function lol(id,source,weapon,hpdmg)
	if(weapon==74) then
		parse("sethealth "..id.." "..player(id,"health")+3)
	end
end

addhook("minute","lolc")
function lolc(id)
	for _,usgn in ipairs (citizen) do
		if player(id,'usgn') == usgn then
			msg (player(id,"name").." Was here before!!@C") --put the people who come before!
		end
	end
end

Im sure it well work!
2× editiert, zuletzt 28.04.11 05:05:03

alt Re: Healing player from the list

Starkkz
Moderator Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Heal_Victims = {12345}

function table.find(array,value)
	for k, v in pairs(array) do
		if v == value then
			return k
		end
	end
	return false
end

addhook("hit","onHit")
function onHit(id,source,wpn,hpdmg,apdmg)
	if wpn == 74 then
		if table.find(Heal_Victims,player(id,"usgn")) then
			parse("sethealth "..id.." "..player(id,"health")+3)
		end
	end
end

alt Re: Healing player from the list

Yates
Reviewer Off Offline

Zitieren
Man, didn't you see the spam violations they got? If you had any brain you would have not just posted that.

Admin/Mod Kommentar

That was unnecessary.

alt Re: Healing player from the list

Starkkz
Moderator Off Offline

Zitieren
That's not nice, please follow the rules. Do NOT spam

Admin/Mod Kommentar

please follow the rules. do not behave like a moderator... oh man...
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht