Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

plugin bug (modify)


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
hi. i have this plugin and when its hs only on (amx_hsonly 1) you can hit and kill players only with hs, but sometimes some players can hit and kill their enemy with no hs.. i don't know why, the plugin don't shows any warnings or errors on compile.
HTML Code:

#include <amxmodx>
#include <fun>
#include <csdm>

#define TASKID 127546

static None[]="";

new bool:bEnabled;

public aim_prac(id)
{
    if (id && !((get_user_flags(id) & ADMIN_CVAR)))
    {
        client_print(id, print_console, "[Indungi] Nu ai acces la aceasta comanda.")
        return PLUGIN_CONTINUE
    }
    new arg[8]
    read_argv(1, arg, 7)
    if(equal(arg, None))
    {
        client_print(id, print_console, "amx_hsonly <on/off>");
        return PLUGIN_HANDLED;
    }
    if((equali(arg, "on"))||(equali(arg, "1")))
    {
        set_user_hitzones(0 ,0, 2)
        client_print(id, print_console, "[Indungi] Modul HS Only a fost activat.")
        new name[32]
        get_user_name(id,name,charsmax(name))
        colorchat_CC( 0, "!E[Indungi]!N Modul!V HS Only!N a fost activat de catre!V %s!N.", name)
        set_hudmessage(0, 100, 0, 0.02, 0.18, _, _, 1.0, _, _, 1)
        show_hudmessage (0, "HS ONLY: ON");
        bEnabled = true;
    }
    else
    {
        set_user_hitzones(0, 0, 255)
        client_print(id, print_console, "[Indungi] Modul HS Only a fost dezactivat.")
        new name[32]
        get_user_name(id,name,charsmax(name))
        colorchat_CC( 0, "!E[Indungi]!N Modul!V HS Only!N a fost dezactivat de catre!V %s!N.", name)
        set_hudmessage(0, 90, 0, 0.02, 0.18, _, _, 1.0, _, _, 1)
        show_hudmessage (0, "HS ONLY: OFF");
        bEnabled = false;
    }
    return PLUGIN_HANDLED
}

public plugin_init()
{
    register_plugin("Aim Practice","1.0","James Romeril")
    register_concmd("amx_hsonly", "aim_prac", ADMIN_CVAR, "")
   
    set_task(1.0, "ShowHudMessage", TASKID, _, _, "b");
}

public ShowHudMessage()
{
    new iPlayers[32], iNum;
    get_players(iPlayers, iNum, "ch");
   
    if(iNum > 0)
    {
        bEnabled ? set_hudmessage(0, 128, 0, 0.02, 0.25, _, _, 1.0, _, _, 1) : set_hudmessage(255, 0, 0, 0.02, 0.25, _, _, 1.0, _, _, 1);
               
           
        for(new i; i < iNum; i++)
        {
            show_hudmessage(iPlayers, "HS Only: %s", bEnabled ? "ON" : "OFF");
        }
    }
}

stock colorchat_CC(const id, const input[], any:...)
{
    new count = 1, Jucatori[32]
    static msg[191]
    vformat(msg, 190, input, 3)
   
    replace_all(msg, 190, "!V", "^4") // Culoarea Verde
    replace_all(msg, 190, "!N", "^1") // Culoarea Normala a Chat-ului (galben)
    replace_all(msg, 190, "!E", "^3") // Culoarea Echipei : CT = Albastru | T = Rosu.
   
    if (id) Jucatori[0] = id; else get_players(Jucatori, count, "ch")
    {
        for (new Y = 0; Y < count; Y++)
        {
            if (is_user_connected(Jucatori[Y]))
            {
                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, Jucatori[Y])
                write_byte(Jucatori[Y]);
                write_string(msg);
                message_end();
            }
        }
    }
}

Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

×
×
  • Dodaj nową pozycję...