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 doesnt work


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
hello im new here
i have problem with using plugin which after compile . in game will not work and giving me this error:


L 01/15/2020 - 19:19:56: Client CVAR querying is not enabled - check MM version!
L 01/15/2020 - 19:19:56: [AMXX] Run time error 10 (plugin "my.amxx") (native "query_client_cvar") - debug not enable

then after i turn on debug it will show this error:


L 01/15/2020 - 19:24:11: Client CVAR querying is not enabled - check MM version!
L 01/15/2020 - 19:24:11: [AMXX] Displaying debug trace (plugin "my.amxx")
L 01/15/2020 - 19:24:11: [AMXX] Run time error 10: native error (native "query_client_cvar")
L 01/15/2020 - 19:24:11: [AMXX] [0] my.sma::fps_check (line 29)


i want to block clients about using developer 1 (only developer 0 allowed)
and if they used "developer 1" then kick/ban them from server

im using this source code:

HTML Code:

#include <amxmodx>

#define MAXPLAYERS        32

new max_reset
new count[MAXPLAYERS+1]

public plugin_init() {
        register_plugin("Developer 0", "1.0", "connor")
        max_reset = register_cvar("max_bad_value", "5")
}

public plugin_cfg() {
        set_task(5.0, "fps_check", _, _, _, "b")
}

public client_connect(id) {
        count[id] = 0
}

public client_disconnect(id) {
        count[id] = 0
}

public fps_check() {
        new players[MAXPLAYERS], inum
        get_players(players, inum, "ch") //don't collect BOTs & HLTVs
        for(new i; i<inum; ++i)
                query_client_cvar(players , "developer" , "cvar_result")
}

public cvar_result(id, const cvar[], const value[])
{
        if(equal(value, "Bad CVAR request"))
        {
                server_cmd("kick #%d Please remove the alias that blocks fps_max or developer cvar", get_user_userid(id))
        }

        new iValue = str_to_num(value)

        if(!iValue)
                return

        client_cmd(id, "developer 0")
        client_print(id, print_chat, "Your ^"developer^" cvar has been set to 0, don't touch it")
        count[id]++
       
        if(count[id] >
= get_pcvar_num(max_reset))
                server_cmd("kick #%d You have bad cvar values to play on this server", get_user_userid(id))
}

thanks.

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ę...