Forum

> > CS2D > Scripts > Weapon damage for admin
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Weapon damage for admin

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Weapon damage for admin

limonata
User Off Offline

Zitieren
Hi, i need to help about this script.

This script is working but everybody's weapon has 1000 damage. It should be only for me. May you fix it? And i need to all weapons will be 1000 damage.

Thanks

1
2
3
4
5
6
7
8
9
10
11
12
13
14
weaps = {"USP","Glock","Deagle","P228","Elite","Five-Seven","M3","XM1014","MP5","M4A1"}

admin = {50998}

addhook("spawn","dmg")
function dmg(id)
	for _, i in ipairs(admin) do
		if player(id,"usgn") == i then
			for i = 1,#weaps do
				parse("mp_wpndmg "..weaps[i].." 1000")
			end
		end		
	end
end

alt Re: Weapon damage for admin

Rainoth
Moderator Off Offline

Zitieren
You make all the conditions and then you change damage for certain weapons. It doesn't work that way since the damage is dealth depending on the weapon itself, not the player holding it.

You can do it a bit differently via hit hook.

1
2
3
4
5
6
addhook("hit","potatofestival)
function potatofestival(i,s,w,hpd,apd,rawd) -- I hope the sequence is fine ._.
	if player(s,"usgn")==YourPotatoUsgn then
		parse("sethealth "..i.." "..player(i,"health")-999)
	end
end
You can change it to take many USGNs from your table since I'm too lazy to do that.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht