PointShop points for kill players !



function KillPoints( victim, inflictor, attacker  )
	if( attacker:IsPlayer() and victim:IsPlayer() ) then
		attacker:PS_GivePoints( 50 );
			attacker:PS_Notify("voce ganhou 50 pontos");
	end
end


i don’t know for why not working…
anybody can help me ?
thanks

The function KillPoints isn’t an OG function. I think the function your looking for is this
https://wiki.garrysmod.com/page/GM/PlayerDeath someone correct me if I am wrong.

EDIT: Also what side are you running this on? (EX: Server Side, Client Side, Shared?)

You should actually hook the function to PlayerDeath: [lua]hook.Add(“PlayerDeath”, “name”, KillPoints)[/lua]



hook.Add("PlayerDeath", "", function( victim, inflictor, attacker )
    if not IsValid(attacker) or not attacker:IsPlayer() then return end
    if attacker == victim then return end
    attacker:PS_GivePoints(5)
end)


Found @ http://forum.facepunch.com/showthread.php?t=1389120