Exemplo n.º 1
0
        public void ClientCmdRefreshWeaponHud(string amount, string preview, string ret, string zoomret, string amountInClips)
        {
            amount        = Util.detag(amount);
            preview       = Util.detag(preview);
            ret           = Util.detag(ret);
            zoomret       = Util.detag(zoomret);
            amountInClips = Util.detag(amountInClips);

            coGuiTextCtrl AmmoAmount = "AmmoAmount";

            if (!amount.AsBool())
            {
                AmmoAmount.setVisible(false);
            }
            else
            {
                if (console.isObject("AmmoAmount"))
                {
                    AmmoAmount.setVisible(true);
                    AmmoAmount.setText("Ammo: " + amount + "/" + amountInClips);
                }
            }

            coGuiBitmapBorderCtrl WeaponHUD = "WeaponHUD";

            if (preview.Trim() == "")
            {
                WeaponHUD.setVisible(false);
            }
            else
            {
                WeaponHUD.setVisible(true);
                ((coGuiBitmapCtrl)"PreviewImage").setBitmap("art/gui/weaponHud/" + preview);
            }

            coGuiCrossHairHud Reticle = "Reticle";

            if (ret.Trim() == "")
            {
                Reticle.setVisible(false);
            }
            else
            {
                Reticle.setVisible(true);
                Reticle.setBitmap("art/gui/weaponHud/" + ret);
            }

            coGuiCrossHairHud ZoomReticle = "ZoomReticle";

            if ("ZoomReticle".isObject())
            {
                ZoomReticle.setBitmap(zoomret == "" ? "" : "art/gui/weaponHud/" + zoomret);
            }
        }
Exemplo n.º 2
0
        public void ClientCmdSetAmmoAmountHud(string amount, string amountInClips)
        {
            coGuiTextCtrl AmmoAmount = "AmmoAmount";

            if (!amount.AsBool())
            {
                AmmoAmount.setVisible(false);
            }
            else
            {
                AmmoAmount.setVisible(true);
                AmmoAmount.setText("Ammo: " + amount + "/" + amountInClips);
            }
        }