Raised This Month: $ Target: $400
 0% 

Aim and add health


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 10-16-2010 , 06:44   Aim and add health
Reply With Quote #1

How i can dow that then I aim on any player and push button +use that give to player +100 hp?
__________________
Still studying scripting...
zirualas is offline
Send a message via Skype™ to zirualas
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 10-16-2010 , 07:36   Re: Aim and add health
Reply With Quote #2

try this:
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fun>

public plugin_init(){
    
register_plugin("Boost Target HP""1.0""Sylwester")
    
register_forward(FM_CmdStart,"fwd_CmdStart")
}

public 
fwd_CmdStart(iduc_handleseed){
    static use
    if(!(
get_uc(uc_handle,UC_Buttons)&IN_USE)){
        use&=~(
1<<id)
        return
    }
    if(!(use&
1<<id)){
        new 
targetbodypart
        get_user_aiming
(idtargetbodypart)
        if(
is_user_alive(target))
            
set_user_health(targetget_user_health(target)+100)
    }
    use|=
1<<id

__________________
Impossible is Nothing
Sylwester is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 10-16-2010 , 09:10   Re: Aim and add health
Reply With Quote #3

It's working, thx ;]
__________________
Still studying scripting...
zirualas is offline
Send a message via Skype™ to zirualas
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 10:24.


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