I DONT KNOW IF YOU ALREADY SOLVED IT
Well.. try with this..
I replaced this things:
(I dont know if this is really necessary, but i always put the original parameters)
Function fix hat geschrieben
function killexp(id,killer,weapon)
To
function killexp(victim,killer,weapon,x,y)
------------------------------------
Now you won't use "id" you will use "victim" (That is the guy who died)
(I think this make all your problems)
Killer ERROR fix hat geschrieben
if player(killer,"weapon")==51 then
To
if weapon==51 then
------------------------------------
The problem is that in the parameters you ALREADY have "weapon" so you only need to put weapon==51 and it will take it that the killer weapon.
The problem with "weapontype" is because when u fire the grenade, you get setted the knife, and when the lua watches your weapontype (when you dont have the grenade because you fired it) you have the knife and it reads it like weapon==50.
Now try with this:
1
2
3
4
5
6
7
8
addhook("die","killexp")
function killexp(victim,killer,weapon,x,y)
	exp[killer]=exp[killer]+100
	if weapon==51 then
		exp[killer]=exp[killer]+50
		msg2(killer,"©250000000Killed with granade! Bonus 50exp!")
	end
end
Zitat
ATTENTION: Remember that the word is "grenade" not "grenate"
I deleted the "exp" things to test it, and it works well with the grenade, i hope it works for you
Tell me how it works 1× editiert, zuletzt 16.11.11 00:59:14