English Disable specific weapon id's from dropping

2 replies
Goto Page
To the start Previous 1 Next To the start
Up
Denisgrad
User
Offline Off
I noticed that some weapons such as machete and claw, will drop no matter the settings you choose when you start the game. Is it possible to create a function using "die" hook for example to strip specific weapons upon death?
30.11.17 02:33:47 am
Up
olie18
User
Offline Off
@user Denisgrad:

Code:
1
2
3
4
5
6
addhook("die","dont_drop_glocks")
function dont_drop_glocks(victim,killer,weapon)
     if (weapon==2) then
     parse("strip "..victim.." "..2.."")
     end
end
30.11.17 01:58:55 pm
Up
Talented Doge
User
Offline Off
Code:
1
2
3
4
5
addhook("drop", "_drop")

function _drop(p, i, t)
     if t == 1 and player(p, "health") == 0 then return 1 end
end


This will work as well.
Talented Doge
To the start Previous 1 Next To the start