Raised This Month: $ Target: $400
 0% 

Someone give this plugin a home


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
IceMouse[WrG]
Senior Member
Join Date: Mar 2004
Old 04-18-2004 , 18:14   Someone give this plugin a home
Reply With Quote #1

I was writing a plugin and all was going good. Then I finished, fixed the few compiler errors, and went to test it out.
It gave me a bad load. So I went to switch a few things around, and nothing seemed to work. So I'm going to do the IceMouse thing, and give up. I'll let someone else work on it, and do whatever they please with it.
All it is, is the beginning what would have been a small conversion of EntMod(By Drunken_F00l)
So if you want to take it off my hands, then just say you will. I'll happily answer any questions about the source you have, and offer ideas of where to go from there if you fix it
Code:
#include <amxmodx> #include <amxmisc> #include <engine> //#define VELOCITY new PLUGIN[] = "EntMod"; new VERSION[] = "1.0BETA"; new AUTHOR[] = "IceMouse"; new grabbed[33] = {0,...}; new Float:grablength[33] = {0.0,...}; #if defined VELOCITY     new graboldmove[33] = {0,...};     new graboldsolid[33] = {0,...}; #endif new rndTaskID; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);     register_clcmd("+grabent", "BeginEntGrab", ADMIN_LEVEL_A, " - Grab an entity");     register_clcmd("-grabent", "EndEntGrab");     register_clcmd("+pushent", "BeginEntPush", ADMIN_LEVEL_A, " - Push the currently held entity away");     register_clcmd("-pushent", "EndEntPush");     register_clcmd("+pullent", "BeginPullEnt", ADMIN_LEVEL_A, " - Pull the currently held entity close");     register_clcmd("-pullent", "EndEntPull");     register_clcmd("use_ent","cmdUseEnt",ADMIN_LEVEL_A," - Use the entity you are looking at");     register_cvar("amxx_movestrength","25");     rndTaskID = (random_num(35,3500)*random_num(3,18))%random_num(59, 293); } public client_connect(id) {     #if defined VELOCITY         if(grabbed[id] > 0)         {             entity_set_int(grabbed[id],EV_INT_movetype,graboldmove[id]);             entity_set_int(grabbed[id],EV_INT_solid,graboldsolid[id]);         }         graboldmove[id] = 0;         graboldsolid[id] = 0;     #endif     grabbed[id] = 0;     grablength[id] = 0.0;     return PLUGIN_CONTINUE; } public client_disconnect(id) {     #if defined VELOCITY         if(grabbed[id] > 0)         {             entity_set_int(grabbed[id],EV_INT_movetype,graboldmove[id]);             entity_set_int(grabbed[id],EV_INT_solid,graboldsolid[id]);         }         graboldmove[id] = 0;         graboldsolid[id]=0;     #endif     grabbed[id] = 0;     grablength[id] = 0.0;     return PLUGIN_CONTINUE; } public BeginEntGrab(id,level,cid) {     if(!cmd_access(id,level,cid,1))     {         client_print(id,print_console,"You do not have access to this command");         return PLUGIN_HANDLED;     }     grabbed[id] = -1;     return PLUGIN_HANDLED; } public EndEntGrab(id,level,cid) {     #if defined VELOCITY         if(grabbed[id] > 0)         {             entity_set_int(grabbed[id],EV_INT_movetype,graboldmove[id]);             entity_set_int(grabbed[id],EV_INT_solid,graboldsolid[id]);         }         graboldmove[id] = 0;         graboldsolid[id]=0;     #endif     grabbed[id] = 0;     grablength[id] = 0.0;     return PLUGIN_HANDLED; } public client_PreThink(id) {     if(grabbed[id] != -1)         return PLUGIN_CONTINUE             new grabEnt;     new Float:Origin[3];     new Float:End[3];     new NmEnd[3];     new Float:Return[3];         entity_get_vector(id,EV_VEC_origin,Origin);     get_user_origin(id,NmEnd,3);     IVecFVec(NmEnd,End);         grabEnt = trace_line(id, Origin, End, Return);     if(!grabEnt)         return PLUGIN_CONTINUE;     grabbed[id] = grabEnt;     #if defined VELOCITY         graboldmove[id] = entity_get_int(id,EV_INT_movetype);         graboldsolid[id] = entity_get_int(id,EV_INT_solid);         entity_set_int(id,EV_INT_solid,SOLID_BBOX);         entity_set_int(id,EV_INT_movetype,MOVETYPE_FLY);     #endif     grablength[id] = vector_distance(Origin, Return);     return PLUGIN_CONTINUE; } public server_frame() {     new a = 1;     for(a = 1; a < 33; a++)     {                 new entid, entGrabber;         new i = 1;         new Float:GrabberOrigin[3];         new Float:GrabbedOrigin[3];         new Float:NewLook[3];         new NmNewLook[3];         new Float:NewLen;         new Float:Vec[3];                 if(grabbed[a] > 0)         {             entid = grabbed[a];             entGrabber = a;         }         else         {             continue;         }                 if(entid < 33 && entid > 0)         {             if(!is_user_alive(entid))             {                 grabbed[a] = 0;                 grablength[a] = 0.0;                 continue;             }         }                         entity_get_vector(entid,EV_VEC_origin,GrabbedOrigin);         entity_get_vector(entGrabber,EV_VEC_origin,GrabberOrigin);         get_user_origin(entGrabber,NmNewLook,3);         IVecFVec(NmNewLook,NewLook);         NewLen = vector_distance(GrabberOrigin,NewLook);         if(NewLen == 0.0)             NewLen = 1.0;                     for(i = 0; i < 3; i++)         {             Vec[i] = (NewLook[i] - GrabberOrigin[i]) * (grablength[entGrabber]/NewLen);             Vec[i] = GrabberOrigin[i] + Vec[i];             #if defined VELOCITY                 Vec[i] = Vec[i] - GrabbedOrigin[i];             #endif         }         #if defined VELOCITY             entity_set_vector(entid, EV_VEC_velocity, Vec);         #else             entity_set_vector(entid, EV_VEC_origin, Vec);         #endif     }     return PLUGIN_CONTINUE; } public BeginEntPull(id,level,cid) {     if(!cmd_access(id,level,cid,1))         return PLUGIN_HANDLED;         if(grabbed[id] > 0)         if(!task_exists(rndTaskID+id))             set_task(0.1, "PullTask", rndTaskID+id, "", 1, "b")         else             client_print(id,print_console,"You are already manipluating an entity!");     else         client_print(id,print_console, "You have no entity to pull!");         return PLUGIN_HANDLED; } public EndEntPull(id,level,cid) {     if(task_exists(rndTaskID+id))         remove_task(rndTaskID+id);     return PLUGIN_HANDLED; } public BeginEntPush(id,level,cid) {     if(!cmd_access(id,level,cid,1))             return PLUGIN_HANDLED;             if(grabbed[id] > 0)         if(!task_exists(rndTaskID+id))             set_task(0.1, "PushTask", rndTaskID+id, "", 1, "b")         else             client_print(id,print_console,"You are already manipulating an entity!");     else         client_print(id,print_console, "You have no entity to push!");             return PLUGIN_HANDLED; } public EndEntPush(id,level,cid) {     if(task_exists(rndTaskID+id))         remove_task(rndTaskID+id);     return PLUGIN_HANDLED; } public PushTask(TaskID) {     new id = TaskID - rndTaskID;     if(grabbed[id] < 1)         remove_task(TaskID);     grablength[id] += get_cvar_num("amxx_movestrength"); } public PullTask(TaskID) {     new id = TaskID - rndTaskID;     if(grabbed[id] < 1)         remove_task(TaskID);     grablength[id] -= get_cvar_num("amxx_movestrength"); } public cmdUseEnt(id,level,cid) {     if(!cmd_access(id,level,cid,1))         return PLUGIN_HANDLED;     new Float:Origin[3];     new NmLook[3];     new Float:Look[3];     new Float:Return[3];     new entid;         entity_get_vector(id,EV_VEC_origin,Origin);     get_user_origin(id,NmLook,3);     IVecFVec(NmLook,Look);         entid = trace_line(id,Origin, Look, Return);     if(!entid)     {         client_print(id,print_console,"You are not looking at an entity");         return PLUGIN_HANDLED;     }     force_use(id,entid);         return PLUGIN_HANDLED; }
It compiles with no errors, and gives a bad load. Good luck!
EDIT: It's also likely to be a silly error(A misspelling or something)... I'm just too lazy to grammar-check
IceMouse[WrG] is offline
Send a message via AIM to IceMouse[WrG] Send a message via MSN to IceMouse[WrG] Send a message via Yahoo to IceMouse[WrG]
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 04-18-2004 , 18:37  
Reply With Quote #2

damn you... i have secretly been working on this myself
__________________
My Plugins

Got ??
AssKicR is offline
IceMouse[WrG]
Senior Member
Join Date: Mar 2004
Old 04-18-2004 , 18:57  
Reply With Quote #3

It only took me about 1/2 hour to do this morning
EDIT: And it should drag entities as intended... And everything else should work... With the exception of loading
IceMouse[WrG] is offline
Send a message via AIM to IceMouse[WrG] Send a message via MSN to IceMouse[WrG] Send a message via Yahoo to IceMouse[WrG]
IceMouse[WrG]
Senior Member
Join Date: Mar 2004
Old 04-18-2004 , 20:29  
Reply With Quote #4

I suppose nobody's got the guts to take this one!!!!!
Oh well I'll add one or two things while it's rotting away
IceMouse[WrG] is offline
Send a message via AIM to IceMouse[WrG] Send a message via MSN to IceMouse[WrG] Send a message via Yahoo to IceMouse[WrG]
QwertyAccess
Veteran Member
Join Date: Feb 2004
Location: Enjiru Layer
Old 04-18-2004 , 20:33  
Reply With Quote #5

add e_use
__________________
QwertyAccess is offline
IceMouse[WrG]
Senior Member
Join Date: Mar 2004
Old 04-18-2004 , 20:34  
Reply With Quote #6

Thats what I was about to add
IceMouse[WrG] is offline
Send a message via AIM to IceMouse[WrG] Send a message via MSN to IceMouse[WrG] Send a message via Yahoo to IceMouse[WrG]
QwertyAccess
Veteran Member
Join Date: Feb 2004
Location: Enjiru Layer
Old 04-18-2004 , 20:38  
Reply With Quote #7

plugin looks neat
__________________
QwertyAccess is offline
IceMouse[WrG]
Senior Member
Join Date: Mar 2004
Old 04-18-2004 , 20:40  
Reply With Quote #8

I may not leave the best comments, but my names aren't as trivial as some peoples code(OLO)
IceMouse[WrG] is offline
Send a message via AIM to IceMouse[WrG] Send a message via MSN to IceMouse[WrG] Send a message via Yahoo to IceMouse[WrG]
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 04-18-2004 , 20:46  
Reply With Quote #9

I'l adopt ur plugin if ur giving up =/, but that doesn't sound like u too give up
__________________
My Plugins

Got ??
AssKicR is offline
IceMouse[WrG]
Senior Member
Join Date: Mar 2004
Old 04-18-2004 , 20:47  
Reply With Quote #10

Well I'm not going to dwell on it... The majority of the code is there, so if someone gets it to load, then it's basically done... All I know is that this has been asked for A LOT
IceMouse[WrG] is offline
Send a message via AIM to IceMouse[WrG] Send a message via MSN to IceMouse[WrG] Send a message via Yahoo to IceMouse[WrG]
Reply


Thread Tools
Display Modes

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 07:29.


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