Adding Cash

Im using the FLOODMOD v1.1 and im trying to make it so when u shoot a prop it gives you 1 dollar

the original code is:
if attacker:IsPlayer() then
if attacker:GetActiveWeapon() != NULL then
if attacker:GetActiveWeapon():GetClass() == “weapon_pistol” then
ent:SetNWInt(“PropHealth”, ent:GetNWInt(“PropHealth”) - 1)
elseif attacker:GetActiveWeapon():GetClass() == “weapon_crossbow” then
ent:SetNWInt(“PropHealth”, ent:GetNWInt(“PropHealth”) - 10)
elseif attacker:GetActiveWeapon():GetClass() == “weapon_rpg” then
ent:SetNWInt(“PropHealth”, ent:GetNWInt(“PropHealth”) - 30)
elseif attacker:GetActiveWeapon():GetClass() == “weapon_deagle” then
ent:SetNWInt(“PropHealth”, ent:GetNWInt(“PropHealth”) - 3)
elseif attacker:GetActiveWeapon():GetClass() == “weapon_357” then
ent:SetNWInt(“PropHealth”, ent:GetNWInt(“PropHealth”) - 4)
elseif attacker:GetActiveWeapon():GetClass() == “weapon_tmp” then
ent:SetNWInt(“PropHealth”, ent:GetNWInt(“PropHealth”) - 3)
end
end
else
if attacker:GetClass() == “entityflame” then
ent:SetNWInt(“PropHealth”, ent:GetNWInt(“PropHealth”) - .5)
else
ent:SetNWInt(“PropHealth”, ent:GetNWInt(“PropHealth”) - 1)
end
end

and i tried to do this:

			if attacker:GetActiveWeapon():GetClass() == "weapon_pistol" then
				ent:SetNWInt("PropHealth", ent:GetNWInt("PropHealth") - 1)
				pl:SetNWInt("Cash", PlCash + 1)

but it doesnt make it so it gives you a dollar. Would attacker:SetNWInt(“Cash”, PlCash + 1) work?

Just want to say, that is a lot of networked variables.

[lua]
local weapon = {
[“weapon_pistol”] = 1,
[“weapon_crossbow”] = 10,
[“weapon_rpg”] = 30,
[“weapon_deagle”] = 3,
[“weapon_357”] = 4,
[“weapon_tmp”] = 3,
}

if attacker:IsPlayer() then
ent:SetNWInt(“PropHealth”,ent:GetNWInt(“PropHealth”) - weapon[attacker:GetActiveWeapon():GetClass()])
attacker:SetNWInt(“Cash”,attacker:GetNWInt(“Cash”) + weapon[attacker:GetActiveWeapon():GetClass()])
elseif table.HasValue(weapon,attacker:GetClass()) then
ent:SetNWInt(“PropHealth”,ent:GetNWInt(“PropHealth”) - weapon[attacker:GetClass()])
end[/lua]

There always be an easy way.