[PointShop] Way To give players points for a kill?

ok im making a new game mode and i need some small help with 2 things 1 is a way to get the point shop to work to my liking.
#1 rewarding a player for killing another.
#2 if possible reward player for killing a npc.
#3 for some reason my players can spawn guns and i would like to remove the weapons category completely or at least for every one under super admin if posible… i am having a tough time with it…

For what gamemode?

1# GM:PlayerDeath
2# GM:OnNPCKilled
3# GM:PlayerSpawnSWEP

Does the gamemode matter?

I’m pretty sure PlayerDeath is independent of gamemode.

#1



--untested and won't work without some research from you
hook.Add("PlayerDeath","AwardPointShopPoints",function( ply,inf,attacker)
  if(attacker:IsPlayer()) then
    attacker:AwardPointshopPoints(numPoints) -- something like PS_AddPoints
  end
end)


#2



--untested and won't work without some research from you
hook.Add("OnNPCKilled","AwardPointShopPoints_NPC",function(npc,attacker,inf)
  if(attacker:IsPlayer()) then
    attacker:AwardPointshopPoints(numPoints)
  end
end)


#3
if your gamemode derives sandbox, pretty sure you can



hook.Add("PlayerSpawnSWEP","AbleToSpawnSWEP",function ( ply, class, info )
  if ply:IsAdmin() then
    return return true
  else
    return false
  end
end)


where would i put this one
hook.Add(“PlayerSpawnSWEP”,“AbleToSpawnSWEP”,function ( ply, class, info )
if ply:IsAdmin() then
return return true
else
return false
end
end)

Don’t forget to check whether the attacker is the victim (suicide)

Edit:
You need to put the code in any serverside or shared file. There’s a few typos fixed here if you’re going to use it:



hook.Add("PlayerSpawnSWEP","AbleToSpawnSWEP",function ( ply, class, info )
	if ply:IsAdmin() then
		return true
	else
		return false
	end
end)


i put it in this right as a .lua garrysmod\lua\autorun

[editline]23rd October 2015[/editline]

i’m making a game mode named sqauds