If that function belonged to a class named ClassA
then this would be how you’d do it:
var c = new ClassA();
c.AdvertisingBot( player, packet);
Obviously you’d need an instance for that types represented by the variables player
and packet.
Your question is lacking detail…
solved Calling function C# [closed]