Raised This Month: $ Target: $400
 0% 

Tripmines HELP!!!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
|2ob
Senior Member
Join Date: Mar 2004
Location: Ontario, Canada
Old 04-23-2004 , 21:00   Tripmines HELP!!!
Reply With Quote #1

I posted in Supprt/Help, please delete that post.

I compiled Vexd's Trip mine plugin with no problems, didnt need to change a thing on it, but when i use it, my server gets messed, it doesnt show on the server list and no1 can connect to it.

can someone fix this plugin to work with engine and amxmodx includes?

here is the code:

Code:
#include <amxmod> #include <amxmisc> #include <string> #include <Vexd_Utilities> 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]     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_tripmine")         ENT_SetModel(NewEnt, "models/v_tripmine.mdl")     Entvars_Set_Int(NewEnt, EV_INT_body, 3)     Entvars_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     Entvars_Set_Vector(NewEnt, EV_VEC_mins, MinBox)     Entvars_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]     TraceLn(id, vOrigin, vTraceEnd, vTraceResult)     if(TraceNormal(id, vOrigin, vTraceEnd, vNormal) == 0) {         RemoveEntity(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)     ENT_SetOrigin(NewEnt, vNewOrigin)     VecToAngles(vNormal, vEntAngles)     Entvars_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)     TraceLn(-1, vNewOrigin, vBeamEnd, vTracedBeamEnd)     Entvars_Set_Vector(NewEnt, EV_VEC_vuser1, vTracedBeamEnd)     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.     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 = FindEntity(-1, "vexd_tripmine")     while(iCurrent != -1) {         new Float:vOrigin[3]         Entvars_Get_Vector(iCurrent, EV_VEC_origin, vOrigin)         new Float:vEnd[3]         Entvars_Get_Vector(iCurrent, EV_VEC_vuser1, vEnd)         new Float:vTrace[3]         new iHit         iHit = TraceLn(iCurrent, vOrigin, vEnd, vTrace)         if(iHit > 0) {             new szClassName[32]             Entvars_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)                 RemoveEntity(iCurrent)             }         }         iCurrent =  FindEntity(iCurrent, "vexd_tripmine")     } } public LaserThink() {     new iCurrent     iCurrent = FindEntity(-1, "vexd_tripmine")     while(iCurrent != -1) {         new Float:vOrigin[3]         Entvars_Get_Vector(iCurrent, EV_VEC_origin, vOrigin)         new Float:vEnd[3]         Entvars_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 =  FindEntity(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 }


Note: it compiles fine just like that, but if you change vexd_utilities to engine it comes up with 26 errors, i only want this plugin, no sub like proximity mine plugin (sorry)
__________________
24/7 Custom Maps Vitrus | Style by www.WebGZ.net
64.247.24.125:27015

Visit Vitrus's Clan Site!

I would put more, but they have a limit on chars
|2ob is offline
Send a message via AIM to |2ob Send a message via MSN to |2ob
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:31.


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