Raised This Month: $ Target: $400
 0% 

velocity_by_aim


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
maakera
Member
Join Date: Jul 2009
Old 06-01-2010 , 16:09   Re: velocity_by_aim
Reply With Quote #1

hmm like this ?
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <vector>
#include <engine>
#include <hamsandwich>
#define PLUGIN "Knife Boost"
#define VERSION "1.0"
#define AUTHOR "Zibit"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam Ham_Weapon_SecondaryAttack"weapon_knife""Boost")
}

public 
Boost(id)
{
new 
ClipAmmoWeapon get_user_weapon(idClipAmmo
if ( 
Weapon == CSW_KNIFE ) {   
new 
Float:vRetValue[3]
velocity_by_aim id500vRetValue )
console_print id"Boost Used!" )
}

__________________

maakera is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-02-2010 , 02:12   Re: velocity_by_aim
Reply With Quote #2

No

Replace Boost( id ) with Boost( iKnife ), where iKnife is the entity index of the knife, then use private offset m_pPlayer to retrieve player id, and add velocity to him (you may also check if it's the first push of attack2)

This may help you : http://cs-sdk.googlecode.com/svn/trunk/wpn_knife.cpp

Also, you shoule make some research on hamsandwich, fakemeta, on how to use ham hooks and pdatas, before you start anything, else you will make lots of errors and you gonna loose lot of time.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 05:24.


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