Thread: Monster Mod
View Single Post
solano
Member
Join Date: Nov 2009
Old 11-24-2009 , 04:18   Re: Monster Mod
Reply With Quote #14

huh...another problem
Code:
#include <amxmodx> 
#include <amxmisc> 
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <engine>

#define INTERVAL 0.3

public plugin_init() 
{ 
    
    register_plugin("HL Monster Hunt","0.1","Solano") 
    register_concmd("amx_monster","admin_monster",ADMIN_SLAY,"<name/id/authid/@CT/@TERRORIST/ * (all)> <monster> <number>")
    return PLUGIN_CONTINUE 
}
public plugin_precache()
{
    precache_model("models/zombie.mdl")
    return PLUGIN_CONTINUE
}

public admin_monster(id,level,cid)
{
    if (!cmd_access(id,level,cid,4))
    {
        return PLUGIN_HANDLED 
    }
    new arg1[32],monster[32],arg3[9]
    read_argv(1,arg1,31) 
    read_argv(2,monster,31)
    read_argv(3,arg3,8)
    new num_monsters
    num_monsters = str_to_num(arg3)
    if(num_monsters<1){
        num_monsters=1;}
    new entid
    entid = create_entity("zombie")
    entity_set_string(entid, EV_SZ_classname, "monster")
    entity_set_model(entid, "models/zombie.mdl")
    new Float:Vec[3] = {50.0,50.0,5.0}
    entity_set_origin(entid, Vec)
    entity_set_int(entid, EV_INT_solid, 1)
    entity_set_int(entid, EV_INT_movetype, 6)
    return PLUGIN_HANDLED
}
i have this code and when i execute it(dont mind that some arguments in the function are not used this is only a test) all of the bullets and rockets and everything goes through walls and the lazor on the bazooka disapears
EDIT:ah yeah and i cant reload
EDIT2: i fixed it
Code:
#include <amxmodx> 
#include <amxmisc> 
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <engine>

#define INTERVAL 0.3

public plugin_init() 
{ 
    
    register_plugin("HL Monster Hunt","0.1","Solano") 
    register_concmd("amx_monster","admin_monster",ADMIN_SLAY,"<name/id/authid/@CT/@TERRORIST/ * (all)> <monster> <number>")
    return PLUGIN_CONTINUE 
}
public plugin_precache()
{
    precache_model("models/zombie.mdl")
    return PLUGIN_CONTINUE
}

public admin_monster(id,level,cid)
{
    if (!cmd_access(id,level,cid,4))
    {
        return PLUGIN_HANDLED 
    }
    new arg1[32],monster[32],arg3[9]
    read_argv(1,arg1,31) 
    read_argv(2,monster,31)
    read_argv(3,arg3,8)
    new num_monsters
    num_monsters = str_to_num(arg3)
    if(num_monsters<1){
        num_monsters=1;}
    new entid
    entid = create_entity("zombie")
    if (entid<1)
    {
        console_print(0,"GODDAMN SHIIIIIIIIIIIT!")
        return PLUGIN_HANDLED
    }
    entity_set_string(entid, EV_SZ_classname, "monster")
    entity_set_model(entid, "models/zombie.mdl")
    new Float:Vec[3] = {50.0,50.0,5.0}
    entity_set_origin(entid, Vec)
    entity_set_int(entid, EV_INT_solid, 1)
    entity_set_int(entid, EV_INT_movetype, 6)
    return PLUGIN_HANDLED
}
but no zombie is spawning

Last edited by solano; 11-24-2009 at 04:39.
solano is offline