Raised This Month: $ Target: $400
 0% 

Pushable block?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-04-2007 , 10:11   Re: Pushable block?
Reply With Quote #11

Hmmm, yeah lol , you'r right ...I've maked this but is not working , should work but nothing...

Code:
#include <amxmodx>
#include <fakemeta>
 
#define PLUGIN "Pushable Block"
#define VERSION "1.0"
#define AUTHOR "Alka"
 
public plugin_init() {
 
 register_plugin(PLUGIN, VERSION, AUTHOR);
 
 register_forward(FM_Touch, "Fwd_Touch");
}
 
public Fwd_Touch(Ent, id)
{
 if(!is_user_connected(id) || !pev_valid(Ent))
  return FMRES_IGNORED;
 
 static ClassName[32];
 pev(Ent, pev_classname, ClassName, sizeof ClassName - 1);
 
 if(equal(ClassName, "bm_block"))
 {
  static Button;
  Button = pev(id, pev_button);
 
  if(Button & IN_USE)
  {
   client_print(id, print_chat, "debug: Mooving..."); //Debug. :P
 
   static Float:AimVec[3];
   //velocity_by_aim(id, 1, AimVec); //1 - Want to move the ent with player spped.
   engfunc(EngFunc_GetAimVector, id, 1.0, AimVec); //Fakemeta style. :D
 
   //Both not working. :S
 
   set_pev(Ent, pev_velocity, AimVec);
  }
 }
 return FMRES_IGNORED;
}
Btw, debug works ;)
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
 



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 01:15.


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