Forum

> > CS2D > Scripts > Help lua admin
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Help lua admin

8 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Help lua admin

Noswear222
User Off Offline

Zitieren
Hello unreal
I wanted a help when the players were shooting the admin and the weapon damage decreased, but only with the admin not to the players I'll give an example:
- Unreal Hello, my example

mp_wpndmg "..wpn.." .." "..dmg.."

As this example will happen with the players and admin, but I wanted just to the admin If you can not answer me

alt Re: Help lua admin

J4x
User Off Offline

Zitieren
maybe this can help:


1
2
3
4
5
6
7
8
9
10
USGN = {your account}

addhook("attack","adminz")
function adminz(id)
    for i,v in pairs (USGN) do
    if player(id,"usgn) == v then
    parse("mp_wpndmg "..wpn.." .." "..dmg..")
              end
        end
end

alt Re: Help lua admin

EngiN33R
Moderator Off Offline

Zitieren
Except that will increase weapon damage for all players. I recommend using hit hook and sethealth command.

alt Re: Help lua admin

J4x
User Off Offline

Zitieren
Fixed and tabbed.
1
2
3
4
5
6
7
8
9
10
USGN = {your account}

addhook("hit","adminz")
function adminz(id,source,weapon,hpdmg,apdmg)
	for i,v in pairs (USGN) do
	if player(id,"usgn") == v then
parse("sethealth "..id.." "..(player(id,"health")-(hpdmg*2)))
		end
	end
end
1× editiert, zuletzt 17.05.11 22:59:25

alt Re: Help lua admin

EngiN33R
Moderator Off Offline

Zitieren
Tabbed my ass. And I don't think he wanted that admins kill players right away, maybe try using
1
parse("sethealth "..id.." "..(player(id,"health")-(hpdmg*2)))

alt Re: Help lua admin

RAVENOUS
BANNED Off Offline

Zitieren
user J4x hat geschrieben
Fixed and tabbed.
1
2
3
4
5
6
7
8
9
10
USGN = {your account}

addhook("hit","adminz")
function adminz(id,source,weapon,hpdmg,apdmg)
	for i,v in pairs (USGN) do
		if player(id,"usgn") == v then
			parse("sethealt "..id.." 0")
		end
	end
end


tabbed and tabbed
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht