SynapseSL/Synapse

How do I configure a Custom weapon

Closed this issue · 1 comments

How do I configure a Custom weapon i added with the custom items section

It's quite simple just use one of the events of Synapse and check if the used weapon is your custom weapon and apply all the changes like this

private void Player_PlayerDamageEvent(SynapseEventArguments.PlayerDamageEventArgs ev)
{
   if (ev.Killer?.ItemInHand?.ID == 257) //Instead of 257 use the ID of your Custom Item
       ev.Damage = 99999;
}

also don't forget to hook the method to the event