Иконка ресурса

FREE ammoGUI : 1.0.0 1.0.0

Нет прав для скачивания
C#:
---
layout: forums
title: 'Help with my AmmoGUI plugin'
breadcrumbs:
 - "Plugin Development": "/forums/plugin-development.105/"
 - "Rust Development": "/forums/rust-development.4/"
---
<div class="titleBar">
    <h1>
        <a href="{{ '/threads/help-with-my-ammogui-plugin.12801/' | prepend: site.baseurl }}">Help with my AmmoGUI plugin</a>
    </h1>
    <p id="pageDescription" class="muted">Discussion in '<a href="{{ '/forums/rust-development.4/' | prepend: site.baseurl }}">Rust Development</a>' started by <a class="username"
            dir="auto">DylanSMR</a>, <a href="{{ '/threads/help-with-my-ammogui-plugin.12801/' | prepend: site.baseurl }}"><span class="DateTime" title="Nov 15, 2015 at 5:23 AM">Nov 15,
                2015</span></a>.
    </p>
</div>
<ol class="messageList" id="messageList">
    <li id="post-143931" class="message" data-author="DylanSMR">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="DylanSMR" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto">DylanSMR</a>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml"> So, I&#039;ve been working on a small little ammoGUI based off of A3L I&#039;ve got some code down but I need to
                        make sure this will work if I were to use it(Currently its just reading the current gun, not if its a bolt or something along those lines{Basically this will only work with a
                        AK atm})<br /> I might also need a bit of help with the gui later down on the line as I am not very good with them yet.<br />
                        <br />
                        <div class="bbCodeBlock bbCodeCode">
                            <div class="type">Code:</div>
                            {% raw %}<pre>
using Oxide.Core;
using Oxide.Core.Plugins;
using System;
using System.Collections.Generic;
using System.Reflection;namespace Oxide.Plugins
{
    [Info(&quot;ammoGUI&quot;, &quot;DylanSMR&quot;, 0.1, ResourceId = 1459)]
    [Description(&quot;Simple New GUI with ammo.&quot;)]
    public class ammoGUI : RustPlugin
    {
        int CurrentAmmo = this.primaryMagazine.contents;
        string CurrentAmmoText;        protected void OnWeaponFired()
        {
            Item ownerItem =  this.GetOwnerItem();
            if (ownerItem == null)
                return;
            if (CurrentAmmo =&gt; 29 &amp;&amp; CurrentAmmo == 30)
                CurrentAmmoText = &quot;Your Magazine is Full&quot;;
            else if (CurrentAmmo == 20 &amp;&amp; CurrentAmmo =&gt; 21)
                CurrentAmmoText = &quot;Your Magazine is Half Full&quot;;
            else if (CurrentAmmo == 10 &amp;&amp; CurrentAmmo =&gt; 11)
                CurrentAmmoText = &quot;You will need to reload very soon.&quot;;
        }
    }           
}
</pre>{% endraw %}
                        </div>
                        <div class="messageTextEndMarker">&nbsp;</div>
                    </blockquote>
                </article>
            </div>
            <div class="messageMeta ToggleTriggerAnchor">
                <div class="privateControls">
                    <span class="item muted">
                        <span class="authorEnd"><a class="username author" dir="auto">DylanSMR</a>,</span>
                        <a href="{{ '/threads/help-with-my-ammogui-plugin.12801/' | prepend: site.baseurl }}" title="Permalink" class="datePermalink"><span class="DateTime"
                                title="Nov 15, 2015 at 5:23 AM">Nov 15, 2015</span></a>
                    </span>
                </div>
                <div class="publicControls">
                    <a href="{{ '/threads/help-with-my-ammogui-plugin.12801/' | prepend: site.baseurl }}" title="Permalink" class="item muted postNumber hashPermalink OverlayTrigger"
                        data-href="posts/143931/permalink">#1</a>
                </div>
            </div>
        </div>
    </li>
    <li id="post-144122" class="message" data-author="Mughisi">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="Mughisi" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto">Mughisi</a>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml"> You need to grab the amount in the OnWeaponFired hook and you should use the parameters that are passed with it,
                        you could have a look at my infinite ammo plugin actually to see how to grab the current amount of loaded ammunition. <div class="messageTextEndMarker">&nbsp;</div>
                    </blockquote>
                </article>
            </div>
            <div class="messageMeta ToggleTriggerAnchor">
                <div class="privateControls">
                    <span class="item muted">
                        <span class="authorEnd"><a class="username author" dir="auto">Mughisi</a>,</span>
                        <a href="{{ '/threads/help-with-my-ammogui-plugin.12801/#post-144122' | prepend: site.baseurl }}" title="Permalink" class="datePermalink"><span class="DateTime"
                                title="Nov 16, 2015 at 7:15 AM">Nov 16, 2015</span></a>
                    </span>
                </div>
                <div class="publicControls">
                    <a href="{{ '/threads/help-with-my-ammogui-plugin.12801/#post-144122' | prepend: site.baseurl }}" title="Permalink" class="item muted postNumber hashPermalink OverlayTrigger"
                        data-href="posts/144122/permalink">#2</a>
                </div>
            </div>
        </div>
    </li>
</ol>

Автор
15FPS
Скачиваний
0
Просмотры
1
Первый выпуск
Обновление
Оценка
0.00 звёзд 0 оценок
Сверху