Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool recoil, nospread, massive_kill;
- BaseWeapon current_weapon;
- WeaponManager weapon_manager;
- void Update()
- {
- if (Time.frameCount % 60 == 0)
- {
- WeaponManager[] wmgers = GameObject.FindObjectsOfType(typeof(WeaponManager)) as WeaponManager[];
- foreach (WeaponManager wm in wmgers)
- {
- if (wm.isActiveAndEnabled)
- {
- weapon_manager = wm;
- }
- }
- if (weapon_manager.ActiveWeapon)
- {
- current_weapon = weapon_manager.ActiveWeapon;
- }
- }
- if (current_weapon)
- {
- if (recoil)
- {
- current_weapon.Accuracy.aimAccuracy = 0;
- current_weapon.Accuracy.maxRecoilAngle = 0;
- current_weapon.Accuracy.recoilFireDeltaAngle = 0;
- current_weapon.Accuracy.runAccuracyFactor = 0;
- current_weapon.Accuracy.standAccuracy = 0;
- current_weapon.Accuracy.recoilReductionDelta = 0;
- }
- if (nospread)
- {
- current_weapon.Accuracy.errorAngle = 0;
- current_weapon.Accuracy.errorAngleFactor = 0;
- }
- }
- if (massive_kill)
- {
- if (Time.frameCount % 120 == 0)
- {
- PlayerDamage[] Players_dmg = GameObject.FindObjectsOfType(typeof(PlayerDamage)) as PlayerDamage[];
- foreach (PlayerDamage dmg in Players_dmg)
- {
- dmg.SendMessage("KillPlayer", SendMessageOptions.DontRequireReceiver);
- }
- }
- }
- }
- void OnGUI()
- {
- if (current_weapon)
- {
- GUILayout.Label("WEAPON_AVAILABLE: " + current_weapon.WeaponName);
- }
- else
- {
- GUILayout.Label("WEAPON_AVAILABLE: NOT_FOUND!");
- }
- if (GUILayout.Button("Recoil: "+recoil))
- {
- recoil = !recoil;
- }
- if (GUILayout.Button("NoSpread: " + nospread))
- {
- nospread = !nospread;
- }
- if (GUILayout.Button("Massive Kills: " + massive_kill))
- {
- massive_kill = !massive_kill;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement