I looking for a make a script for make a bot (yes again
) "vampire" (personnality of bots)When bot Dracula kill, he win the blood (+ 20 HP)
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
addhook("kill", "bot_vampire")
function bot_vampire(killer, victim, weapon, x, y)
	if player(id,"bot")==true and player(id,"name")=="Dracula" then
		if weapon==50 then
		parse('equip '..id..' '..65)
else
	return
		end
	end
end
But, have a error(s) :
LUA ERROR: sys/lua/autorun/check vampire.lua:3: bad argument #1 to 'player' (number expected, got nil)-> [C]: in function 'player'
Thanks for advance.
hook kill, bot vampire
1 
Offline