CarKill Fine

Hello, I would like to have a code ( because I can not ) that when a person carkill she lose € 500 it makes him a notification you lose € 500 , thank you for helping me

Gamemode?

My gamemode is darkrp :stuck_out_tongue: sorry

Hello, this is not a request forum. Go here: https://scriptfodder.com

I know, I just wonder if someone does not already have a script on fooder because there is none : p

Does vehicle kills have a specific DMG enumeration? Or does it fall under GENERIC or CRUSH? Becuase making the fine system is easy

He can request help.

Entity:PhysicsInitSphere( number radius, string physmat )

Try something like that.

You should really stop trying to help people if you have no idea what on earth your even talking about.

Edit:
You can use this hook http://wiki.garrysmod.com/page/GM/PlayerDeath and
This is untested but it should get you started in the right direction.


hook.Add("PlayerDeath", "CarKillFine", function(victim, inflictor, attacker)
	if IsValid(inflictor) and inflictor:IsVehicle() then 
		-- Run whatever code you want on the driver inflictor:GetDriver()
	end
end)

Make sure you use

Vehicle:GetDriver instead of GetOwner so that the person who is driving the car will be punished and not the owner.