AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Conversion: Vexd's Tripmines (https://forums.alliedmods.net/showthread.php?t=1860)

|2ob 05-10-2004 22:24

Conversion: Vexd's Tripmines
 
Hey, i have posted before on this plugin, but no1 seems to actually help.
The problem is that my Condition Zero server crashes when i run this plugin, it does not show on the master list and no one can connect to it.

It compiles fine. It just does not run on CZ, can someone try on 1.6 to see the results?

here is my edited code:


Code:
#include <amxmodx> #include <amxmisc> #include <engine> new beam, boom public Vexd_CreateMine(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_tripmine")         entity_set_model(NewEnt, "models/v_tripmine.mdl")    entity_set_int(NewEnt, EV_INT_body, 3)    entity_set_int(NewEnt, EV_INT_sequence, 7)   // 7 = TRIPMINE_WORLD    new Float:MinBox[3]    new Float:MaxBox[3]    MinBox[0] = -8.0    MinBox[1] = -8.0    MinBox[2] = -8.0    MaxBox[0] = 8.0    MaxBox[1] = 8.0    MaxBox[2] = 8.0    entity_set_vector(NewEnt, EV_VEC_mins, MinBox)    entity_set_vector(NewEnt, EV_VEC_maxs, MaxBox)    new Float:vNewOrigin[3]    new Float:vNormal[3]    new Float:vTraceDirection[3]    new Float:vTraceEnd[3]    new Float:vTraceResult[3]    new Float:vEntAngles[3]    VelocityByAim(id, 64, vTraceDirection)        vTraceEnd[0] = vTraceDirection[0] + vOrigin[0]    vTraceEnd[1] = vTraceDirection[1] + vOrigin[1]    vTraceEnd[2] = vTraceDirection[2] + vOrigin[2]    trace_line(id, vOrigin, vTraceEnd, vTraceResult)    if(trace_normal(id, vOrigin, vTraceEnd, vNormal) == 0) {       remove_entity(NewEnt)       console_print(id, "[TripMines] You must plant the tripmine on a wall!")       return PLUGIN_HANDLED_MAIN    }    vNewOrigin[0] = vTraceResult[0] + (vNormal[0] * 8.0)    vNewOrigin[1] = vTraceResult[1] + (vNormal[1] * 8.0)    vNewOrigin[2] = vTraceResult[2] + (vNormal[2] * 8.0)    entity_set_origin(NewEnt, vNewOrigin)    vector_to_angle(vNormal, vEntAngles)    entity_set_vector(NewEnt, EV_VEC_angles, vEntAngles)    new Float:vBeamEnd[3]    new Float:vTracedBeamEnd[3]    vBeamEnd[0] = vNewOrigin[0] + (vNormal[0] * 8192)    vBeamEnd[1] = vNewOrigin[1] + (vNormal[1] * 8192)    vBeamEnd[2] = vNewOrigin[2] + (vNormal[2] * 8192)    trace_line(-1, vNewOrigin, vBeamEnd, vTracedBeamEnd)    entity_set_vector(NewEnt, EV_VEC_vuser1, vTracedBeamEnd)    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.    emit_sound(NewEnt, CHAN_WEAPON, "weapons/mine_deploy.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    emit_sound(NewEnt, CHAN_VOICE, "weapons/mine_charge.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    return PLUGIN_HANDLED_MAIN } public TripMineThink() {    new iCurrent    iCurrent = find_ent_by_class(-1, "vexd_tripmine")    while(iCurrent != -1) {       new Float:vOrigin[3]       entity_get_vector(iCurrent, EV_VEC_origin, vOrigin)       new Float:vEnd[3]       entity_get_vector(iCurrent, EV_VEC_vuser1, vEnd)       new Float:vTrace[3]       new iHit       iHit = trace_line(iCurrent, vOrigin, vEnd, vTrace)       if(iHit > 0) {          new szClassName[32]          entity_get_string(iHit, EV_SZ_classname, szClassName, 32);                    if(equal(szClassName, "player")) {             message_begin(MSG_BROADCAST, SVC_TEMPENTITY)             write_byte(99) //99 = KillBeam             write_short(iCurrent)             message_end()             message_begin(MSG_BROADCAST, SVC_TEMPENTITY)             write_byte(3)             write_coord(floatround(vOrigin[0]))             write_coord(floatround(vOrigin[1]))             write_coord(floatround(vOrigin[2]))             write_short(boom)             write_byte(50)             write_byte(15)             write_byte(0)             message_end()             RadiusDamage(vOrigin, 1)             remove_entity(iCurrent)          }       }       iCurrent =  find_ent_by_class(iCurrent, "vexd_tripmine")    } } public LaserThink() {    new iCurrent    iCurrent = find_ent_by_class(-1, "vexd_tripmine")    while(iCurrent != -1) {       new Float:vOrigin[3]       entity_get_vector(iCurrent, EV_VEC_origin, vOrigin)       new Float:vEnd[3]       entity_get_vector(iCurrent, EV_VEC_vuser1, vEnd)       message_begin(MSG_BROADCAST,SVC_TEMPENTITY)       write_byte(0)       write_coord(floatround(vOrigin[0]))       write_coord(floatround(vOrigin[1]))       write_coord(floatround(vOrigin[2]))       write_coord(floatround(vEnd[0])) //Random       write_coord(floatround(vEnd[1])) //Random       write_coord(floatround(vEnd[2])) //Random       write_short(beam)       write_byte(0)       write_byte(0)       write_byte(10) //Life       write_byte(5) //Width       write_byte(0)       write_byte(255) // r       write_byte(0) // g       write_byte(0) // b       write_byte(200)       write_byte(0)       message_end()       iCurrent =  find_ent_by_class(iCurrent, "vexd_tripmine")    } } public plugin_init(){     register_plugin("Vexd Entity demo (TripMine)","1.00","default")     register_concmd("amx_setmine","Vexd_CreateMine",ADMIN_KICK)     set_task(0.01, "TripMineThink", 0, "", 0, "b")     set_task(1.0, "LaserThink", 0, "", 0, "b")     return PLUGIN_CONTINUE } public plugin_precache() {    precache_sound("weapons/mine_deploy.wav")    precache_sound("weapons/mine_charge.wav")    precache_model("models/v_tripmine.mdl")    beam = precache_model("sprites/laserbeam.spr")    boom = precache_model("sprites/zerogxplode.spr")    return PLUGIN_CONTINUE }

please leave any comments on this plugin, i need alot of help on this.

|2ob 05-11-2004 17:19

fucking shit.

Why wont anyone help me damn it?
After this problem is fixed im gunna post it on the plugins forum.
Why the fuck do you people just look and not say a fucking word?

FeuerSturm 05-11-2004 17:21

Quote:

Originally Posted by |2ob
fucking shit.

Why wont anyone help me damn it?
After this problem is fixed im gunna post it on the plugins forum.
Why the fuck do you people just look and not say a fucking word?

because I don't have a clue about CS, CS:CZ and SMALL.

DoD player here, so sorry for no help, but i would if i could :P

|2ob 05-11-2004 19:12

*bump*

QwertyAccess 05-11-2004 21:39

Does CZ even have access to pak0 file?

|2ob 05-11-2004 23:02

hmmm... i have no idea lol... i guess thats the problem... what are the files that are in pak0 that are needed so i can replace them?

Ingram 05-11-2004 23:51

u should still probably try it on 1.6 first, i'd volunteer, but i'm too busy at the moment

|2ob 05-12-2004 18:15

Quote:

public plugin_precache() {
precache_sound("weapons/mine_deploy.wav")
precache_sound("weapons/mine_charge.wav")
precache_model("models/v_tripmine.mdl")
beam = precache_model("sprites/laserbeam.spr")
boom = precache_model("sprites/zerogxplode.spr")

return PLUGIN_CONTINUE
}
does anyone know where to get the files that are highlighted?

AssKicR 05-12-2004 18:32

they are defaulted with Half-Life... Everyone has them

|2ob 05-12-2004 19:12

okie dokie

QwertyAccess 05-12-2004 19:52

Quote:

Originally Posted by AssKicR
they are defaulted with Half-Life... Everyone has them

I hear some mods disable the use of pak0 so they cant use em.

|2ob 05-12-2004 23:38

i think some1 fucked up the engine module... when i load this plugin, there isnt even a bad load, it just crashes.

AClockworkOrange 06-18-2004 10:12

someon please help, id love to use this plugin too !!


All times are GMT -4. The time now is 11:14.

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