AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   wont work (https://forums.alliedmods.net/showthread.php?t=1357)

CrAzy F00L 04-24-2004 16:39

wont work
 
i cant get this plugin to work.. it compiles fine... but it says sumthing like
[AMXX] Invalid Plugin

heres the code

Code:

#include <amxmod>
#include <amxmisc>
#include <string>
#include <float>
#include <Vexd_Utilities>

new beam, boom

public vexd_pfntouch(pToucher, pTouched) {
    new szClassName[32]
    Entvars_Get_String(pToucher, EV_SZ_classname, szClassName, 32);

    if(equal(szClassName, "vexd_rocket") || equal(szClassName, "vexd_vrocket")) {
        emit_sound(pToucher, CHAN_WEAPON, "vox/_period.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
        emit_sound(pToucher, CHAN_VOICE, "vox/_period.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

        new Float:vExplodeAt[3]
        Entvars_Get_Vector(pToucher, EV_VEC_origin, vExplodeAt)

        RadiusDamage(vExplodeAt, 1, 50)

        message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
        write_byte(3)
        write_coord(floatround(vExplodeAt[0]))
        write_coord(floatround(vExplodeAt[1]))
        write_coord(floatround(vExplodeAt[2]))
        write_short(boom)
        write_byte(50)
        write_byte(15)
        write_byte(0)
        message_end()

        new iOwner
        iOwner = Entvars_Get_Edict(pToucher, EV_ENT_owner)

        AttachView(iOwner, iOwner)    //Resets rocket owner's view (in case of vrocket).

        RemoveEntity(pToucher)
    }

    return 1;
}

public Vexd_CreateRocket(id,level,cid){
    if (!cmd_access(id,level,cid,1))
        return PLUGIN_HANDLED

    new Float:vOrigin[3]
    new Float:vAngles[3]
    Entvars_Get_Vector(id, EV_VEC_origin, vOrigin)
    Entvars_Get_Vector(id, EV_VEC_v_angle, vAngles)

        new NewEnt
        NewEnt = CreateEntity("info_target")

        if(NewEnt == 0) {
            return PLUGIN_HANDLED_MAIN
        }

    Entvars_Set_String(NewEnt, EV_SZ_classname, "vexd_rocket")

        ENT_SetModel(NewEnt, "models/rpgrocket.mdl")

    new Float:MinBox[3]
    new Float:MaxBox[3]
    MinBox[0] = -1.0
    MinBox[1] = -1.0
    MinBox[2] = -1.0
    MaxBox[0] = 1.0
    MaxBox[1] = 1.0
    MaxBox[2] = 1.0

    Entvars_Set_Vector(NewEnt, EV_VEC_mins, MinBox)
    Entvars_Set_Vector(NewEnt, EV_VEC_maxs, MaxBox)

    ENT_SetOrigin(NewEnt, vOrigin)
    Entvars_Set_Vector(NewEnt, EV_VEC_angles, vAngles)

    Entvars_Set_Int(NewEnt, EV_INT_effects, 64)  //64 = EF_LIGHT, rocket glow. 64??
    Entvars_Set_Int(NewEnt, EV_INT_solid, 2)    //2 = Solid bbox. (const.h)
    Entvars_Set_Int(NewEnt, EV_INT_movetype, 5) //5 = movetype_fly, No grav, but collides.
    Entvars_Set_Edict(NewEnt, EV_ENT_owner, id)


    new Float:fNewVelocity[3]
    VelocityByAim(id, 400, fNewVelocity)
    Entvars_Set_Vector(NewEnt, EV_VEC_velocity, fNewVelocity)

    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte(22)
    write_short(NewEnt)
    write_short(beam)
    write_byte(45)
    write_byte(4)
    write_byte(255)
    write_byte(0)
    write_byte(0)
    write_byte(128)
    message_end()

    emit_sound(NewEnt, CHAN_WEAPON, "weapons/rocketfire1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
    emit_sound(NewEnt, CHAN_VOICE, "weapons/rocket1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

    return PLUGIN_HANDLED_MAIN
}

public Vexd_CreateVRocket(id,level,cid){
    if (!cmd_access(id,level,cid,1))
        return PLUGIN_HANDLED

    new Float:vOrigin[3]
    new Float:vAngles[3]
    Entvars_Get_Vector(id, EV_VEC_origin, vOrigin)
    Entvars_Get_Vector(id, EV_VEC_v_angle, vAngles)

        new NewEnt
        NewEnt = CreateEntity("info_target")

        if(NewEnt == 0) {
            return PLUGIN_HANDLED_MAIN
        }

    Entvars_Set_String(NewEnt, EV_SZ_classname, "vexd_vrocket")

        ENT_SetModel(NewEnt, "models/rpgrocket.mdl")

    new Float:MinBox[3]
    new Float:MaxBox[3]

    MinBox[0] = -1.0
    MinBox[1] = -1.0
    MinBox[2] = -1.0
    MaxBox[0] = 1.0
    MaxBox[1] = 1.0
    MaxBox[2] = 1.0

    Entvars_Set_Vector(NewEnt, EV_VEC_mins, MinBox)
    Entvars_Set_Vector(NewEnt, EV_VEC_maxs, MaxBox)

    ENT_SetOrigin(NewEnt, vOrigin)
    Entvars_Set_Vector(NewEnt, EV_VEC_angles, vAngles)

    Entvars_Set_Int(NewEnt, EV_INT_effects, 64)  //1 = EF_LIGHT, rocket glow. 64??
    Entvars_Set_Int(NewEnt, EV_INT_solid, 2)    //2 = Solid bbox. (const.h)
    Entvars_Set_Int(NewEnt, EV_INT_movetype, 5) //5 = movetype_fly, No grav, but collides.
    Entvars_Set_Edict(NewEnt, EV_ENT_owner, id)


    new Float:fNewVelocity[3]
    VelocityByAim(id, 400, fNewVelocity)
    Entvars_Set_Vector(NewEnt, EV_VEC_velocity, fNewVelocity)

    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte(22)
    write_short(NewEnt)
    write_short(beam)
    write_byte(45)
    write_byte(4)
    write_byte(255)
    write_byte(0)
    write_byte(0)
    write_byte(128)
    message_end()

    emit_sound(NewEnt, CHAN_WEAPON, "weapons/rocketfire1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
    emit_sound(NewEnt, CHAN_VOICE, "weapons/rocket1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

    AttachView(id, NewEnt)

    return PLUGIN_HANDLED_MAIN
}

public RocketThink()
{
    new id, iCurrent
    new Float:vAngles[3], Float:fNewVelocity[3]
    iCurrent = FindEntity(-1, "vexd_vrocket")

    while (iCurrent != -1)
    {
        id = Entvars_Get_Edict(iCurrent, EV_ENT_owner)
        Entvars_Get_Vector(id, EV_VEC_v_angle, vAngles)
        VelocityByAim(id, 400, fNewVelocity)
        Entvars_Set_Vector(iCurrent, EV_VEC_angles, vAngles)
        Entvars_Set_Vector(iCurrent, EV_VEC_velocity, fNewVelocity)
        iCurrent =  FindEntity(iCurrent, "vexd_vrocket")
    }
}

public plugin_init(){
    register_plugin("Vexd Entity demo (Rocket)","1.00","default")
    register_clcmd("amx_rocket","Vexd_CreateRocket",ADMIN_KICK)
    register_clcmd("amx_vrocket","Vexd_CreateVRocket",ADMIN_KICK)
    set_task(0.1, "RocketThink", 0, "", 0, "b")

    return PLUGIN_CONTINUE
}

public plugin_precache() {
    precache_sound("vox/_period.wav")
    precache_sound("weapons/rocketfire1.wav")
    precache_sound("weapons/rocket1.wav")
    precache_model("models/rpgrocket.mdl")
    beam = precache_model("sprites/fire.spr")
    boom = precache_model("sprites/zerogxplode.spr")

    return PLUGIN_CONTINUE
}

if anyone could get this to work i would greatly appreciate it

-Thanks

RPRaiden 04-24-2004 17:21

im not a expert or anything but my "Guess" would be to include amxmodx
not amxmod

FlyingMongoose 04-24-2004 17:58

make sure you also have all of the right amxx version includes like the amxx vexed and all that.

PM 04-25-2004 06:36

Code:

  if (hdr.magic!=AMX_MAGIC)
  {
    strcpy(error,"Invalid plugin");
    return (amx->error = AMX_ERR_FORMAT);
  }

(AMXX sources, modules.cpp)

=>Your plugin file is damaged/invalid => not a valid .amx file.
a) Make sure you use the compiled .amx file and not the .sma file
b) If you are, tell us the compiler (sc) version you have.

CrAzy F00L 04-25-2004 17:13

actualy
 
actualy all vexd plugins compile fine but say invalid when starting up the server

yes the are .amx files
im using the compiler that came with the curent release of amxx

PM 04-26-2004 09:33

that is very weird, please post your compiled .amx files...

CrAzy F00L 04-26-2004 20:18

ok
 
ok i deleted

#include <float>

and it got rid of a whole lot of compiling errors(i was using a amxmod 9.8 compiler(dont as hown it got their, i dont know) so it had errors when i compiled it)

once i deleted that, the only error in compiling was

Warning 217: Loose Indentation

if anyone can fix it plea help the code is

Code:

#include <amxmod>
#include <amxmisc>
#include <string>
#include <Vexd_utilities>

new beam, boom

public vexd_pfntouch(pToucher, pTouched) {
    new szClassName[32]
    Entvars_Get_String(pToucher, EV_SZ_classname, szClassName, 32);

    if(equal(szClassName, "vexd_rocket") || equal(szClassName, "vexd_vrocket")) {
        emit_sound(pToucher, CHAN_WEAPON, "vox/_period.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
        emit_sound(pToucher, CHAN_VOICE, "vox/_period.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

        new Float:vExplodeAt[3]
        Entvars_Get_Vector(pToucher, EV_VEC_origin, vExplodeAt)

        RadiusDamage(vExplodeAt, 1, 50)

        message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
        write_byte(3)
        write_coord(floatround(vExplodeAt[0]))
        write_coord(floatround(vExplodeAt[1]))
        write_coord(floatround(vExplodeAt[2]))
        write_short(boom)
        write_byte(50)
        write_byte(15)
        write_byte(0)
        message_end()

        new iOwner
        iOwner = Entvars_Get_Edict(pToucher, EV_ENT_owner)

        AttachView(iOwner, iOwner)    //Resets rocket owner's view (in case of vrocket).

        RemoveEntity(pToucher)
    }

    return 1;
}

public Vexd_CreateRocket(id,level,cid){
    if (!cmd_access(id,level,cid,1))
        return PLUGIN_HANDLED

    new Float:vOrigin[3]
    new Float:vAngles[3]
    Entvars_Get_Vector(id, EV_VEC_origin, vOrigin)
    Entvars_Get_Vector(id, EV_VEC_v_angle, vAngles)

        new NewEnt
        NewEnt = CreateEntity("info_target")

        if(NewEnt == 0) {
            return PLUGIN_HANDLED_MAIN
        }

    Entvars_Set_String(NewEnt, EV_SZ_classname, "vexd_rocket")

        ENT_SetModel(NewEnt, "models/rpgrocket.mdl")

    new Float:MinBox[3]
    new Float:MaxBox[3]
    MinBox[0] = -1.0
    MinBox[1] = -1.0
    MinBox[2] = -1.0
    MaxBox[0] = 1.0
    MaxBox[1] = 1.0
    MaxBox[2] = 1.0

    Entvars_Set_Vector(NewEnt, EV_VEC_mins, MinBox)
    Entvars_Set_Vector(NewEnt, EV_VEC_maxs, MaxBox)

    ENT_SetOrigin(NewEnt, vOrigin)
    Entvars_Set_Vector(NewEnt, EV_VEC_angles, vAngles)

    Entvars_Set_Int(NewEnt, EV_INT_effects, 64)  //64 = EF_LIGHT, rocket glow. 64??
    Entvars_Set_Int(NewEnt, EV_INT_solid, 2)    //2 = Solid bbox. (const.h)
    Entvars_Set_Int(NewEnt, EV_INT_movetype, 5) //5 = movetype_fly, No grav, but collides.
    Entvars_Set_Edict(NewEnt, EV_ENT_owner, id)


    new Float:fNewVelocity[3]
    VelocityByAim(id, 400, fNewVelocity)
    Entvars_Set_Vector(NewEnt, EV_VEC_velocity, fNewVelocity)

    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte(22)
    write_short(NewEnt)
    write_short(beam)
    write_byte(45)
    write_byte(4)
    write_byte(255)
    write_byte(0)
    write_byte(0)
    write_byte(128)
    message_end()

    emit_sound(NewEnt, CHAN_WEAPON, "weapons/rocketfire1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
    emit_sound(NewEnt, CHAN_VOICE, "weapons/rocket1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

    return PLUGIN_HANDLED_MAIN
}

public Vexd_CreateVRocket(id,level,cid){
    if (!cmd_access(id,level,cid,1))
        return PLUGIN_HANDLED

    new Float:vOrigin[3]
    new Float:vAngles[3]
    Entvars_Get_Vector(id, EV_VEC_origin, vOrigin)
    Entvars_Get_Vector(id, EV_VEC_v_angle, vAngles)

        new NewEnt
        NewEnt = CreateEntity("info_target")

        if(NewEnt == 0) {
            return PLUGIN_HANDLED_MAIN
        }

    Entvars_Set_String(NewEnt, EV_SZ_classname, "vexd_vrocket")

        ENT_SetModel(NewEnt, "models/rpgrocket.mdl")

    new Float:MinBox[3]
    new Float:MaxBox[3]

    MinBox[0] = -1.0
    MinBox[1] = -1.0
    MinBox[2] = -1.0
    MaxBox[0] = 1.0
    MaxBox[1] = 1.0
    MaxBox[2] = 1.0

    Entvars_Set_Vector(NewEnt, EV_VEC_mins, MinBox)
    Entvars_Set_Vector(NewEnt, EV_VEC_maxs, MaxBox)

    ENT_SetOrigin(NewEnt, vOrigin)
    Entvars_Set_Vector(NewEnt, EV_VEC_angles, vAngles)

    Entvars_Set_Int(NewEnt, EV_INT_effects, 64)  //1 = EF_LIGHT, rocket glow. 64??
    Entvars_Set_Int(NewEnt, EV_INT_solid, 2)    //2 = Solid bbox. (const.h)
    Entvars_Set_Int(NewEnt, EV_INT_movetype, 5) //5 = movetype_fly, No grav, but collides.
    Entvars_Set_Edict(NewEnt, EV_ENT_owner, id)


    new Float:fNewVelocity[3]
    VelocityByAim(id, 400, fNewVelocity)
    Entvars_Set_Vector(NewEnt, EV_VEC_velocity, fNewVelocity)

    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte(22)
    write_short(NewEnt)
    write_short(beam)
    write_byte(45)
    write_byte(4)
    write_byte(255)
    write_byte(0)
    write_byte(0)
    write_byte(128)
    message_end()

    emit_sound(NewEnt, CHAN_WEAPON, "weapons/rocketfire1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
    emit_sound(NewEnt, CHAN_VOICE, "weapons/rocket1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

    AttachView(id, NewEnt)

    return PLUGIN_HANDLED_MAIN
}

public RocketThink()
{
    new id, iCurrent
    new Float:vAngles[3], Float:fNewVelocity[3]
    iCurrent = FindEntity(-1, "vexd_vrocket")

    while (iCurrent != -1)
    {
        id = Entvars_Get_Edict(iCurrent, EV_ENT_owner)
        Entvars_Get_Vector(id, EV_VEC_v_angle, vAngles)
        VelocityByAim(id, 400, fNewVelocity)
        Entvars_Set_Vector(iCurrent, EV_VEC_angles, vAngles)
        Entvars_Set_Vector(iCurrent, EV_VEC_velocity, fNewVelocity)
        iCurrent =  FindEntity(iCurrent, "vexd_vrocket")
    }
}

public plugin_init(){
    register_plugin("Vexd Entity demo (Rocket)","1.00","default")
    register_clcmd("amx_rocket","Vexd_CreateRocket",ADMIN_KICK)
    register_clcmd("amx_vrocket","Vexd_CreateVRocket",ADMIN_KICK)
    set_task(0.1, "RocketThink", 0, "", 0, "b")

    return PLUGIN_CONTINUE
}

public plugin_precache() {
    precache_sound("vox/_period.wav")
    precache_sound("weapons/rocketfire1.wav")
    precache_sound("weapons/rocket1.wav")
    precache_model("models/rpgrocket.mdl")
    beam = precache_model("sprites/fire.spr")
    boom = precache_model("sprites/zerogxplode.spr")

    return PLUGIN_CONTINUE
}

thanks
-CrazyFool

CrAzy F00L 04-26-2004 22:09

noone
 
no one knows???

QwertyAccess 04-26-2004 23:02

its just Loose Identification you dont have to worry about it.

CrAzy F00L 04-27-2004 00:50

1 Attachment(s)
it says invalid plugin still
damn

here the compiled version

BigBaller 04-27-2004 02:05

Seeing how this is AMXX Website and not AMX website instead of using

Code:
#include <amxmod> #include <amxmisc> #include <string> #include <Vexd_utilities>

try using

Code:
#include <amxmodx> #include <amxmisc> #include <engine>

I am of course assuming your using AMXX Compiler with AMXX Includes included with the AMXX Packaging.

just so you know

Engine = VexD ... if not all but most Engine functions are what VexD used to use. if you have problems compiling you should check out the include files.

BigBaller 04-27-2004 02:27

Code:
#include <amxmod> #include <amxmisc> #include <engine> new beam, boom public vexd_pfntouch(pToucher, pTouched) {     new szClassName[32]     entity_get_string(pToucher, EV_SZ_classname, szClassName, 32);     if(equal(szClassName, "vexd_rocket") || equal(szClassName, "vexd_vrocket")) {         emit_sound(pToucher, CHAN_WEAPON, "vox/_period.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)         emit_sound(pToucher, CHAN_VOICE, "vox/_period.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)         new Float:vExplodeAt[3]         entity_get_vector(pToucher, EV_VEC_origin, vExplodeAt)         RadiusDamage(vExplodeAt, 1, 50)         message_begin(MSG_BROADCAST, SVC_TEMPENTITY)         write_byte(3)         write_coord(floatround(vExplodeAt[0]))         write_coord(floatround(vExplodeAt[1]))         write_coord(floatround(vExplodeAt[2]))         write_short(boom)         write_byte(50)         write_byte(15)         write_byte(0)         message_end()         new iOwner         iOwner = entity_get_edict(pToucher, EV_ENT_owner)         attach_view(iOwner, iOwner)    //Resets rocket owner's view (in case of vrocket).         remove_entity(pToucher)     }     return 1; } public Vexd_CreateRocket(id,level,cid){     if (!cmd_access(id,level,cid,1))         return PLUGIN_HANDLED     new Float:vOrigin[3]     new Float:vAngles[3]     entity_get_vector(id, EV_VEC_origin, vOrigin)     entity_get_vector(id, EV_VEC_v_angle, vAngles)         new NewEnt         NewEnt = create_entity("info_target")         if(NewEnt == 0) {             return PLUGIN_HANDLED_MAIN         }     entity_set_string(NewEnt, EV_SZ_classname, "vexd_rocket")         entity_set_model(NewEnt, "models/rpgrocket.mdl")     new Float:MinBox[3]     new Float:MaxBox[3]     MinBox[0] = -1.0     MinBox[1] = -1.0     MinBox[2] = -1.0     MaxBox[0] = 1.0     MaxBox[1] = 1.0     MaxBox[2] = 1.0     entity_set_vector(NewEnt, EV_VEC_mins, MinBox)     entity_set_vector(NewEnt, EV_VEC_maxs, MaxBox)     entity_set_origin(NewEnt, vOrigin)     entity_set_vector(NewEnt, EV_VEC_angles, vAngles)     entity_set_int(NewEnt, EV_INT_effects, 64)  //64 = EF_LIGHT, rocket glow. 64??     entity_set_int(NewEnt, EV_INT_solid, 2)    //2 = Solid bbox. (const.h)     entity_set_int(NewEnt, EV_INT_movetype, 5) //5 = movetype_fly, No grav, but collides.     entity_set_edict(NewEnt, EV_ENT_owner, id)     new Float:fNewVelocity[3]     VelocityByAim(id, 400, fNewVelocity)     entity_set_vector(NewEnt, EV_VEC_velocity, fNewVelocity)     message_begin(MSG_BROADCAST, SVC_TEMPENTITY)     write_byte(22)     write_short(NewEnt)     write_short(beam)     write_byte(45)     write_byte(4)     write_byte(255)     write_byte(0)     write_byte(0)     write_byte(128)     message_end()     emit_sound(NewEnt, CHAN_WEAPON, "weapons/rocketfire1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     emit_sound(NewEnt, CHAN_VOICE, "weapons/rocket1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     return PLUGIN_HANDLED_MAIN } public Vexd_CreateVRocket(id,level,cid){     if (!cmd_access(id,level,cid,1))         return PLUGIN_HANDLED     new Float:vOrigin[3]     new Float:vAngles[3]     entity_get_vector(id, EV_VEC_origin, vOrigin)     entity_get_vector(id, EV_VEC_v_angle, vAngles)         new NewEnt         NewEnt = create_entity("info_target")         if(NewEnt == 0) {             return PLUGIN_HANDLED_MAIN         }     entity_set_string(NewEnt, EV_SZ_classname, "vexd_vrocket")         entity_set_model(NewEnt, "models/rpgrocket.mdl")     new Float:MinBox[3]     new Float:MaxBox[3]     MinBox[0] = -1.0     MinBox[1] = -1.0     MinBox[2] = -1.0     MaxBox[0] = 1.0     MaxBox[1] = 1.0     MaxBox[2] = 1.0     entity_set_vector(NewEnt, EV_VEC_mins, MinBox)     entity_set_vector(NewEnt, EV_VEC_maxs, MaxBox)     entity_set_origin(NewEnt, vOrigin)     entity_set_vector(NewEnt, EV_VEC_angles, vAngles)     entity_set_int(NewEnt, EV_INT_effects, 64)  //1 = EF_LIGHT, rocket glow. 64??     entity_set_int(NewEnt, EV_INT_solid, 2)    //2 = Solid bbox. (const.h)     entity_set_int(NewEnt, EV_INT_movetype, 5) //5 = movetype_fly, No grav, but collides.     entity_set_edict(NewEnt, EV_ENT_owner, id)     new Float:fNewVelocity[3]     VelocityByAim(id, 400, fNewVelocity)     entity_set_vector(NewEnt, EV_VEC_velocity, fNewVelocity)     message_begin(MSG_BROADCAST, SVC_TEMPENTITY)     write_byte(22)     write_short(NewEnt)     write_short(beam)     write_byte(45)     write_byte(4)     write_byte(255)     write_byte(0)     write_byte(0)     write_byte(128)     message_end()     emit_sound(NewEnt, CHAN_WEAPON, "weapons/rocketfire1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     emit_sound(NewEnt, CHAN_VOICE, "weapons/rocket1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     attach_view(id, NewEnt)     return PLUGIN_HANDLED_MAIN } public RocketThink() {     new id, iCurrent     new Float:vAngles[3], Float:fNewVelocity[3]     iCurrent = find_ent_by_class(-1, "vexd_vrocket")     while (iCurrent != -1)     {         id = entity_get_edict(iCurrent, EV_ENT_owner)         entity_get_vector(id, EV_VEC_v_angle, vAngles)         VelocityByAim(id, 400, fNewVelocity)         entity_set_vector(iCurrent, EV_VEC_angles, vAngles)         entity_set_vector(iCurrent, EV_VEC_velocity, fNewVelocity)         iCurrent =  find_ent_by_class(iCurrent, "vexd_vrocket")     } } public plugin_init(){     register_plugin("Vexd Entity demo (Rocket)","1.00","default")     register_clcmd("amx_rocket","Vexd_CreateRocket",ADMIN_KICK)     register_clcmd("amx_vrocket","Vexd_CreateVRocket",ADMIN_KICK)     set_task(0.1, "RocketThink", 0, "", 0, "b")     return PLUGIN_CONTINUE } public plugin_precache() {     precache_sound("vox/_period.wav")     precache_sound("weapons/rocketfire1.wav")     precache_sound("weapons/rocket1.wav")     precache_model("models/rpgrocket.mdl")     beam = precache_model("sprites/fire.spr")     boom = precache_model("sprites/zerogxplode.spr")     return PLUGIN_CONTINUE }

100% using AMXX Natives and such, only 8 loose indentions, how bout trying that now for your loading?

Now I havent tested it, but now I have no compile problems and this is using AMXX included files, now maybe you should try and it could possibly load.

CrAzy F00L 04-28-2004 00:02

[AMXX] Function not found (name "find_ent_by_class")

BigBaller 04-28-2004 00:30

Quote:

Originally Posted by CrAzy F00L
[AMXX] Function not found (name "find_ent_by_class")

enable the EGNINE Module in your modules.ini

CrAzy F00L 04-28-2004 00:35

still
 
still happens

BigBaller 04-28-2004 00:38

Code:
/* Finds an entity in the world, will return 0 if nothing is found */ native find_ent_by_class(iIndex, szClass[]);

Are you sure you using the right includes, even the correct modules?

Thats from the engine.inc I have.

CrAzy F00L 04-28-2004 00:42

sorry to trouble you but could you post urs :lol:
and it compiles perfect

once again thanks for ur help


All times are GMT -4. The time now is 05:28.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.