when using the code below the inventory IsSetLocked on the respawned player not on the one that dies. any ideas?
public void lock1(IPlayer player)
{
BasePlayer playerbase = player.Object as BasePlayer;
playerbase.inventory.containerMain.SetLocked(true);
playerbase.inventory.containerBelt.SetLocked(true);
playerbase.inventory.containerWear.SetLocked(true);
}
object OnPlayerDeath(BasePlayer player, HitInfo info)
{
if (permission.UserHasPermission(player.UserIDString, "PoliceInvProt.use"/*"thepolice.cop"*/))
{
IPlayer playerp = player.IPlayer as IPlayer;
lock1(playerp);
}
return null;
}