Here is some examples
Code: Select all
Events.PlayerDropWeaponCallback.Start(OnPlayerDropWeapon);
...
public void OnPlayerDropWeapon(IPlayer player, WeaponItem weaponItem, IObject weaponObj) {
// if the weapon has custom powerup, store the powerup type in custom weapon db using weaponObj.UniqueId as key
}
Events.PlayerPickupWeaponCallback.Start(OnPlayerPickupWeapon);
...
public void OnPlayerPickupWeapon(IPlayer player, WeaponItem weaponItem, IObject weaponObj) {
// check if weaponObj.UniqueId is in custom weapon db. Retrieve the powerup type for the next player
}