Raised This Month: $51 Target: $400
 12% 

Solved [HELP] attack 250 hp = 1 ap


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
spooky HL15
Member
Join Date: Oct 2015
Old 03-19-2018 , 15:10   [HELP] attack 250 hp = 1 ap
Reply With Quote #1

hi, everone i have problem with this scripting
i want make plugin for mod base builder for CT
when CT attack zombie every 250 damage CT will win 1 ap

i try to make it but not working
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "attack 250 hp = 1 ap"
#define VERSION "1.0"
#define AUTHOR "test"

native bb_get_ap1(id)

new 
pg_dmg

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
pg_dmg=register_cvar("bb_hpap","250"
    
register_event("Damage""Damage""b""2!=0")
}
public 
Damage(id)
{
    new 
damage read_data(2)
    new 
tid get_user_attacker(id)    // Gracz atakujacy
    
if(tid==id || !tid || !is_user_alive(tid)) return PLUGIN_HANDLED
    
while(damage>=get_pcvar_num(pg_dmg)){
        
damage-=get_pcvar_num(pg_dmg)
        
        
bb_get_ap1(id)
    }
    return 
PLUGIN_CONTINUE
    



sorry for my bad english

Last edited by spooky HL15; 04-02-2018 at 15:58.
spooky HL15 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 22:25.


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