English change the name of weapon

4 replies
Goto Page
To the start Previous 1 Next To the start
13.05.19 02:35:32 am
Up
haha1955
User
Offline Off
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
13.05.19 10:13:03 am
Up
Rainoth
Moderator
Offline Off
Code:
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
13.05.19 02:56:05 pm
Up
Avo
User
Offline Off
You can also use my file cs2d Zeus x27 - taser script (11) and simply changethe configuration variables in taser.lua:
Code:
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
13.05.19 08:45:10 pm
Up
PsychoKaiserWolf
User
Offline Off
user Rainoth has written:
Code:
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
I have an endless void for heart
14.05.19 10:18:33 pm
Up
haha1955
User
Offline Off
???
edited 1×, last 15.05.19 03:05:26 am
To the start Previous 1 Next To the start