←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

Przy kompliacji wywala błędy.

Locked

  • +
  • -
ptasiek's Photo ptasiek 20.03.2011

#include <amxmodx>
 #include <d2lod>
#include <engine>
#include <hamsandwich>
#include <fakemeta>

new PLUGIN_NAME[] = "Murzyni"
new PLUGIN_AUTHOR[] = "Dr.Gregory House"
new PLUGIN_VERSION[] = "1.0"

#define MAX_MONSTERS 14

new const Monster_Models[MAX_MONSTERS][] =
{
        "models/agrunt.mdl",
        "models/big_mom.mdl",
        "models/bullsquid.mdl",
        "models/controller.mdl",
        "models/garg.mdl",
        "models/headcrab.mdl",
        "models/houndeye.mdl",
        "models/islave.mdl",
        "models/w_squeak.mdl",
        "models/zombie.mdl",
        "models/hgrunt.mdl",
        "models/tentacle.mdl",
        "models/babygarg.mdl",
        "models/bigrat.mdl"
}
new const Monster_Xp[MAX_MONSTERS] =
{
        150,
        600,
        100,
        120,
        0,
        50,
        0,
        120,
        0,
        80,
        0,
        0,
        0,
        0
}
new const Monster_Names[MAX_MONSTERS][] =
{
        "Alien Grunt",
        "Big Momma (Boss)",
        "Bull Squid",
        "Controller",
        "Gargantua (SUPER BOSS)",
        "Head Crab",
        "Hound Eye",
        "Slave",
        "Snark",
        "Zombie",
        "Human Grunt",
        "Tentacle",
        "Baby Garg (BOSS)",
        "Town Rat"
}

new g_iMaxPlayers;

public plugin_init() 
{
        register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

        RegisterHam(Ham_Killed, "func_wall", "Monster_Killed");

        g_iMaxPlayers = get_maxplayers();
}

public Monster_Killed(this, idattacker, shouldgib)
{
        if ( !( 1 <= idattacker <= g_iMaxPlayers ) || !is_valid_ent(this) )
                return HAM_IGNORED;

        new MonsterMdl[32];

        entity_get_string( this, EV_SZ_model, MonsterMdl, charsmax(MonsterMdl) );

        for(new monsters = 0; monsters < MAX_MONSTERS; monsters++) 
        {
                if( equal( MonsterMdl, Monster_Models[monsters] ) ) 
                {
                        set_p_xp( idattacker, get_p_xp(idattacker) + Monster_Xp[monsters]);

                        client_print( idattacker, print_center, "Zabiles %s +%d", Monster_Names[monsters], Monster_Xp[monsters]);
                }
        }

        return HAM_IGNORED;
}

Oraz GDZIE ZNAJDE #include <d2lod> i jak ustawie exp dla stworków
Quote

Fragusek's Photo Fragusek 20.03.2011

<d2lod>
znajdziesz na samej górze między
#include <amxmodx>
#include <engine>


#include <amxmodx>
#include <d2lod>
#include <engine>
#include <hamsandwich>
#include <fakemeta>
Edited by Fragusek, 20.03.2011 15:42.
Quote

  • +
  • -
Goliath's Photo Goliath 20.03.2011

Jeżeli chodzi ci o bibliotekę (plik, a zapewne chodzi o to, a nie o linijkę z kodem) to znajduje się ona w paczce, w której był cały mod. Coś u siebie znalazłem, może o to chodzi:
Attached File  d2lod.inc   5.09KB   42 downloads

A co do expa za potwory, zmieniasz to w tej tabeli:
new const Monster_Xp[MAX_MONSTERS] =
{
150,
600,
100,
120,
0,
50,
0,
120,
0,
80,
0,
0,
0,
0
}
Quote

  • +
  • -
ptasiek's Photo ptasiek 20.03.2011

A hp potworka?

Dodano 20 marzec 2011 - 16:40:
Dodałem i dalej jest dużo błędów przy kompliacji,weś skompliuj i napraw;p
Oraz pomóz hp dodać;P
Quote
Locked