Guest User

BW zombie reward function

a guest
Dec 2nd, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. hook.Add("OnNPCKilled", "GivePoints", OnNPCKilled)
  2.     function OnNPCKilled( victim, Player, weapon )
  3.         local PointReward = { 5, 10, 20, 50, 100, 500, 1000}
  4.         local RandomReward = table.Random(PointReward)
  5.         if ( victim:GetClass() == "npc_zombie" or "npc_headcrab" ) then
  6.         Player:PS2_AddStandardPoints(RandomReward, "Zombie Kill")
  7.     end
  8. end
Advertisement
Add Comment
Please, Sign In to add comment