ItsMods

Full Version: Weapon Remover For Players
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Weapon Remover For Players

Hello is it possible to make a plugin wich can take a gun away by the player name or xuid or make him freeze or something. Cool
Yes, of course...
Code:
if(Client.XUID == "hated player's xuid")
{
// take weapon now
// freeze
}
Full code:
CSHARP Code
  1. List<string> HatedXUID = new List<string>();
  2. public override void OnPlayerSpawned(ServerClient Client)
  3. {
  4. if (HatedXUID.Contains(Client.XUID))
  5. {
  6. Client.Other.PrimaryWeapon = GetWeapon("");
  7. Client.Other.SecondaryWeapon = GetWeapon("");
  8. Client.Other.ControlsFrozen = true;
  9. }
  10. }

Add the xuid of player you don't want to have weapons to HatedXUID
PrimaryWeapon = 0; looks better Tongue
Good job though.