Forum

> > CS2D > Scripts > Help lua admin
Forums overviewCS2D overview Scripts overviewLog in to reply

English Help lua admin

8 replies
To the start Previous 1 Next To the start

old Help lua admin

Noswear222
User Off Offline

Quote
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

old Re: Help lua admin

J4x
User Off Offline

Quote
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

old Re: Help lua admin

EngiN33R
Moderator Off Offline

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

old Re: Help lua admin

J4x
User Off Offline

Quote
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
edited 1×, last 17.05.11 10:59:25 pm

old Re: Help lua admin

EngiN33R
Moderator Off Offline

Quote
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)))

old Re: Help lua admin

RAVENOUS
BANNED Off Offline

Quote
user J4x has written
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
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview