Forum

> > CS2D > Scripts > change the name of weapon
Forums overviewCS2D overview Scripts overviewLog in to reply

English change the name of weapon

4 replies
To the start Previous 1 Next To the start

old change the name of weapon

haha1955
User Off Offline

Quote
hi everybody^^

i have a taser lua, so i will change the gun name, sample: p228 new name is Taser

is that possible, if so, how can i change it or do i have to create a new lua for it?
edited 1×, last 13.05.19 04:28:08 am

old Re: change the name of weapon

Rainoth
Moderator Off Offline

Quote
1
2
3
4
5
6
addhook("hit","_hit")
function _hit(id,source,weapon,hpdmg)
	if weapon == 4 and hpdmg >= player(id,"health") then
		parse("customkill "..source.." Taser "..id)
	end
end

old Re: change the name of weapon

Avo
User Off Offline

Quote
You can also use my file cs2d Zeus x27 - taser script and simply changethe configuration variables in taser.lua:
1
2
3
4
5
6
7
8
9
10
11
12
TaserName = "Zeus x27"
TaserRange = 64
TaserAttackSound = "weapons/taser_attack.ogg"
TaserDrawSound = "weapons/taser_draw.ogg"

TaserInHandImage = "gfx/weapons/taser.bmp"
TaserKillImage = "gfx/weapons/taser_k.bmp"

TaserAngle = 30
TaserSoundRange = 160
TaserBaseDamage = 500
TaserPrice = 200

old Re: change the name of weapon

PsychoKaiserWolf
User Off Offline

Quote
user Rainoth has written
1
2
3
4
5
6
addhook("hit","_hit")
function _hit(id,source,weapon,hpdmg)
	if weapon == 4 and hpdmg >= player(id,"health") then
		parse("customkill "..source.." Taser "..id)
	end
end



He meant, when the weapon is on the floor the name should be taser
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview