I want to make palyers drop money in precentages(%) and disable kill option in console

Hi,
I want to make palyers drop money in precentages(%), how can I do that? can somebody send me be kind and send me a code and tell me where to place it?
Also, I want to disable kill option in console, how can I make it?

Thanks for help.

To disable kill in console, make this hook return false http://wiki.garrysmod.com/page/GM/CanPlayerSuicide

care to elaborate on the percentage part?

also for your suicide issues:



hook.Add("CanPlayerSuicide", "disablesuicide", function()
    return false;
end);


For example, When I want a player to drop 20% of his cash, when a player dies and have 100,000$ on him, he will drop 20,000$.
when a player has 100$, he will drop 20$.

[editline]26th July 2017[/editline]

Where shall I put the suicide code? I dont know where to place it.
tnx for the help

Here is the money drop part:



hook.Add("PlayerDeath", "dropmoneyondeath", function(victim)
	if (not IsValid(victim)) then return; end

	--Get the 20% from the players wallet.
	local amt = (0.20 * victim:getDarkRPVar("money"));
	
	--Create a money bag on the players position with the amount we stored above.
	DarkRP.createMoneyBag(victim:GetPos(), amt);

	--Once we have successfully dropped the money we have to take the same amount from the players wallet.
	victim:addMoney(-amt);
end);


All of this plus the suicide part goes in lua/autorun/server

Thank you very much!!
I will try it right now

Thanks for help its working!!!
love you<3