Raised This Month: $ Target: $400
 0% 

Disable fast moving with things


Post New Thread Reply   
 
Thread Tools Display Modes
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 01-25-2008 , 09:02   Re: Disable fast moving with things
Reply With Quote #11

Hook +USE key and get the user aiming, check if is aiming at moveble ent and store in a boolean or somehting then in prethink, if boolean is true (IsMovingAnEnt == true) reset user speed, when -USE, set the boolean to false (IsMovingAnEnt = false). This is the best way i know.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-25-2008 , 09:05   Re: Disable fast moving with things
Reply With Quote #12

You don't need to aim objects, you can aim right near objects and it still work (tested on cs_estate).
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 01-25-2008 , 09:09   Re: Disable fast moving with things
Reply With Quote #13

ROFL o,O then you should get the aim ent too, because game engine must check if you aim at that ent to move fast, so will work. i think...
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 01-25-2008 , 09:10   Re: Disable fast moving with things
Reply With Quote #14

what about this ?
Code:
#include <amxmodx> #include <fakemeta> new count = 0; public plugin_init() {     register_forward(FM_Use,"fw_use"); } public fw_use(ent,id) {     if(!is_user_alive(id)) return FMRES_IGNORED         new Float:origin[3];     pev(ent,pev_origin,origin);         new find = -1, classname[31];     while( (find = engfunc(EngFunc_FindEntityInSphere,find,origin,40.0)) != 0 )     {         pev(find,pev_classname,classname,30);                 if(containi(classname,"hostage") != -1)             continue;                 count++;     }         if(!count) return FMRES_SUPERCEDE;         return FMRES_IGNORED; }
Dunno if works, maybe i'm wrong
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 01-25-2008 , 09:11   Re: Disable fast moving with things
Reply With Quote #15

Hmm, yeah lol, is a good idea. If that wont work you can hook "CmdStart" and supercede, and will work
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-25-2008 , 10:52   Re: Disable fast moving with things
Reply With Quote #16

Use in not triggered in that case.

CmdStart + find pushable ent in a sphere should work, but there might be a better way
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
toazron1
Senior Member
Join Date: Oct 2006
Old 01-26-2008 , 08:50   Re: Disable fast moving with things
Reply With Quote #17

afaik fm_use doesnt "work" like you think it would, but you could use the Hamsandwhich module
__________________
toazron1 is offline
Send a message via AIM to toazron1
Old 02-01-2008, 18:24
hleV
This message has been deleted by hleV.
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 02-02-2008 , 03:26   Re: Disable fast moving with things
Reply With Quote #18

Updated

Code:
#include <amxmodx>
#include <fakemeta>
 
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Alka"
 
public plugin_init() {
 
 register_plugin(PLUGIN, VERSION, AUTHOR);
 
 register_forward(FM_CmdStart, "Fwd_CmdStart");
 
}
 
public Fwd_CmdStart(id, uc_handle, seed)
{
 if(!is_user_alive(id))
  return FMRES_IGNORED;
 
 static iButtons;
 iButtons = get_uc(uc_handle, UC_Buttons);
 
 if(iButtons & IN_USE)
 {
  static Float:fOrigin[3];
  pev(id, pev_origin, fOrigin);
 
  static iEnt;
  while((iEnt = engfunc(EngFunc_FindEntityInSphere, iEnt, fOrigin, 250.0)))
  {
   if(!pev_valid(iEnt))
    continue;
 
   static sClassname[32];
   pev(iEnt, pev_classname, sClassname, sizeof sClassname - 1);
 
   if(containi(sClassname, "func_pushable") != -1)
   {
    iButtons &= ~IN_USE;
    set_uc(uc_handle, UC_Buttons, iButtons);
 
    return FMRES_SUPERCEDE;
   }
  }
 }
 return FMRES_IGNORED;
}
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 02-05-2008 at 17:04.
Alka is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 02-05-2008 , 16:35   Re: Disable fast moving with things
Reply With Quote #19

Crashes when I press +use (E).
hleV is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 02-05-2008 , 16:59   Re: Disable fast moving with things
Reply With Quote #20

Code updated, look above.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Reply



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 11:02.


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