Salery increase (DarkRP)

Hi guys !

I got this code from searching the old facepunch threads or scriptfodder, I aint sure anymore. However I am rather new to gmod and how it all runs. Here is the code first of all. It is meant to multiply the salary level for donators only.


local cTEAMS = { "[TAG]", "VIPteamname1","VIPteamname2" }
hook.Add("playerGetSalary", "0001a", function( ply, amount )
local multiply = 0;
if ( string.find(ply:GetName(), cTEAMS[1]) ) then
multiply = 2;
end
for k,v in pairs(cTEAMS) do
if k == 1 then continue
elseif ( team.GetName( ply:Team() ) == v ) then multiply = multiply + 3; end
end
return true, amount * multiply
end)

I know I need to edit the rank names etc etc yes yes. My question is that I am unsure of where to put this code in order to make it work ? I figure it is in the DarkRPmodi folder somewhere ^^

Thanks in advance for helping out a rookie :slight_smile:

Regards
Holmenlund

Try this, I did not test it.

[lua]
hook.Add( “playerGetSalary”, “DarkRPIncreaseSalary”, function(ply, amt)
if not ply:CheckGroup(“donator”) then return end
local newSal = amt * 2
return newSal
end )
[/lua]

I think you misunderstand me m8 ^^ My question is where do I put the code to make it work with my darkRP ?

Otherwise thanks for helping haha :smiley:

lua/autorun/server/whateveryouwant.lua

That other code would not have worked either way.

-snip-