Hey guys! Might you help me sort this out? Im trying to make a plugin heal a player and reload his weapon after he kills someone, I've trying to solve it by doing this:
private void OnEntityDeath(BasePlayer player, HitInfo info)
{
var starter = info?.InitiatorPlayer;
if (starter == null || player.userID.IsSteamId() == false || starter?.userID.IsSteamId() == false && !permission.UserHasPermission(player.UserIDString, AUTOHEALANDRELOAD))
{return;
}
starter.Heal(100f);
var projectile = projectile as BasePlayer;
projectile.primaryMagazine.contents = projectile.primaryMagazine.capacity;
projectile.SendNetworkUpdateImmediate();
}But i keep getting this error: Error while compiling: KillReward.cs(28,40): error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer.
How could I fix it? Thank you for the help!
EDIT: Grammar