Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

PlayerWeaponRemovedActionCallback is not fired when the player was gibbed

Here you can find all solved gameplay problems and bugs (beginning from Pre-Alpha 1.8.8).
Forum rules
By using the forum you agree to the following rules. For this forum you also need to follow these additional rules.
Posts: 79
Joined: Thu Feb 07, 2019 4:36 am

PlayerWeaponRemovedActionCallback is not fired when the player was gibbed

Post by NearHuscarl » Thu Mar 26, 2020 6:14 pm

IPlayer.Kill() triggers the event normally but IPlayer.Gib() does not

Code: Select all

public void OnStartup()
	var me = Game.GetPlayers()[0];
	me.AddCommand(new PlayerCommand(PlayerCommandType.DrawHandgun));

	Events.PlayerWeaponRemovedActionCallback.Start((player, arg) =>
		Game.WriteToConsole("remove weapon");
	Events.UpdateCallback.Start((e) =>
		// me.Kill(); // works normally
		Game.WriteToConsole("gib player");
	}, 3000, 1);
1 x

User avatar
Lead Programmer
Lead Programmer
Posts: 1749
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Age: 30

Post by Gurt » Fri Mar 27, 2020 7:41 pm

Fixed after v.1.3.5
0 x