AmxModX - Instalarea unui plugin

Saturday, 21 September 2013 | Views: 1016

Presupunand ca ati instalat deja amxmodx-ul din panou (ori manual) si bineinteles functioneaza, acest tutorial va indruma cum sa instalati un nou plugin descarcat de aici: http://www.amxmodx.org/compiler.php si nu numai.

Cititi cu deosebita atentie descrierea plugin-ului, de multe ori acestea contin si configuratii extinse cum ar fi directoare, resurse, fisiere de limba ... etc.

Un plugin compilat de amxmodx are extensia (terminatia) in .amxx, asadar ar trebui sa avem fisierul nume_plugin.amxx ! Fisierele cu extensie .sma sunt sursele acelor plugin-uri ce pot fi compilate local sau direct aici: http://www.amxmodx.org/webcompiler.cgi, anumite plugin-uri necesita si niste include-uri ce aplicatia web nu le are ... motiv pentru care vom avea in vedere documentatia oficiala amxmodx cu privire la compilarea unui plugin: http://wiki.amxmodx.org/Compiling_Plugins_(AMX_Mod_X)

Bun, avem plugin-ul amxx compilat (exemplu: custom_plugin.amxx), intram pe FTP si incarcam fisierul in directorul /addons/amxmodx/plugins/ - vom observa si alte fisiere implicite in cadrul acelui director precum:


    Plugin (nume fisier)



    Scopul acestuia

    admin.amxx



    Administration Base

    admin_sql.amxx



    Administration Base for SQL. Use only one base.

    admincmd.amxx



    Basic administration commands (such as kick/slap).

    adminhelp.amxx



    Help for admin commands.

    adminslots.amxx



    Slot reservation.

    multilingual.amxx



    Multi-Lingual client configuration.

    menufront.amxx



    Front-end for admin menus.

    cmdmenu.amxx



    Command menu for settings.

    plmenu.amxx



    Player menu commands (kick, ban, etc).

    telemenu.amxx



    Teleport Menu (fun module required).

    mapsmenu.amxx



    Maps menu (vote, changeleve, etc).

    adminchat.amxx



    Console-based chat commands.

    antiflood.amxx



    Prevents clients from flooding the say chat.

    scrollmsg.amxx



    Displays a scrolling message.

    imessage.amxx



    Displays a centered, timed information message.

    adminvote.amxx



    Voting commands.

    nextmap.amxx



    Displays next map in the mapcycle.

    mapchooser.amxx



    Allows players to vote for the next map.

    timeleft.amxx



    Displays time left on the current map.

    pausecfg.amxx



    Allows pausing/unpausing of plugins.

    statscfg.amxx



    Configuration of statistical plugins.



Ulterior, vom purcede la activarea plugin-ului prin deschiderea fisierului (ori descarcarea acestuia pe PC) addons/amxmodx/configs/plugins.ini, in interiorul caruia vom avea:


    ; AMX Mod X plugins


    ; Admin Base - Always one has to be activated

    admin.amxx              ; admin base (required for any admin-related)

    ;admin_sql.amxx         ; admin base - SQL version (comment admin.amxx)


    ; Basic

    admincmd.amxx           ; basic admin console commands

    adminhelp.amxx          ; help command for admin console commands

    adminslots.amxx         ; slot reservation

    multilingual.amxx       ; Multi-Lingual management


    ; Menus

    menufront.amxx          ; front-end for admin menus

    cmdmenu.amxx            ; command menu (speech, settings)

    plmenu.amxx             ; players menu (kick, ban, client cmds.)

    ;telemenu.amxx          ; teleport menu (Fun Module required!)

    mapsmenu.amxx           ; maps menu (vote, changelevel)

    pluginmenu.amxx         ; Menus for commands/cvars organized by plugin


    ; Chat / Messages

    adminchat.amxx          ; console chat commands

    antiflood.amxx          ; prevent clients from chat-flooding the server

    scrollmsg.amxx          ; displays a scrolling message

    imessage.amxx           ; displays information messages

    adminvote.amxx          ; vote commands


    ; Map related

    nextmap.amxx            ; displays next map in mapcycle

    mapchooser.amxx         ; allows to vote for next map

    timeleft.amxx           ; displays time left on map


    ; Configuration

    pausecfg.amxx           ; allows to pause and unpause some plugins

    statscfg.amxx           ; allows to manage stats plugins via menu and commands


    ; Counter-Strike

    ;restmenu.amxx          ; restrict weapons menu

    statsx.amxx             ; stats on death or round end (CSX Module required!)

    ;miscstats.amxx         ; bunch of events announcement for Counter-Strike

    ;stats_logging.amxx     ; weapons stats logging (CSX Module required!)


    ; Enable to use AMX Mod plugins

    ;amxmod_compat.amxx     ; AMX Mod backwards compatibility layer


    ; Custom - Add 3rd party plugins here
    custom_plugin.amxx          ; plugin-ul meu ... 



Am notat cu rosu ceea ce trebuie sa trecem in respectivul fisier pentru ca plugin-ul dorit sa fie activat, cele ce au in fata ; (punct si virgula) nu vor fi incarcate si implicit nu vor functiona, de asemeni orice text ce are in fata acelasi ; (punct si virgula) sunt considerate comentarii si nu vor fi luate in evidenta la runtime. Tocmai de aceea, in exemplul de mai sus (ingrosat cu rosu) se dispune activarea plugin-ului custom_plugin.amxx in vecinatatea caruia am trecut si un comentariu pentru a ne aminti de acesta inregistrare pe viitor.


Dupa aceste modificari, incarcam fisierul plugins.ini pe FTP rescriind peste cel existent si schimbam harta (ori dand restart la server), testam daca plugin-ul a fost incarcat cu succes executand comanda RCON din HLSW ori din joc: amx_plugins, ce ar trebui sa returnerneze ceva similar cu:



    16:40:54 amx_plugins

    16:40:54 Plugin-uri incarcate:

    nume               version  autor             file             statut   

    [....]

    custom plugin   1.0       autor     custom_plugin.amxx       running  


Ceea ce ne indica ca operatia de instalare a plugin-ului in cauza a fost executata corect.

Atentie: In cazul in care NU incarcam complet si corect toate resursele plugin-ului (asa cum am amintit la inceputul tutorialului: unele plugin-uri AU resurse anexe) avem mari sanse ca serverul sa pice la urmatorul restart ... asadar mare atentie! Iar daca va loviti de aceasta problema analizati consola serverului!

Back to list