Hi there, I been in the process in making a gun in Trouble in Terrorist Town which kills Traitors instantly and does not harm Innocents or Detectives. I have created a base line weapon how ever I am running into a propblems with the function I created for testing the weapon. Here is the code:
function SWEP:Damage(ply) if ply:ROLE_TRAITOR then ply:ChatPrint("The Player you shot was a Traitor!") return SWEP.Primary.Damage = 100 end end
Perharps you can tell me were I am going wrong? Here is my error I am receiving from G-mod:
[ERROR] gamemodes/terrortown/entities/weapons/goldgun.lua:40: function arguments expected near 'then' 1. unknown - gamemodes/terrortown/entities/weapons/goldgun.lua:0
Thanks for the Help!