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

kill bonus about


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RYOOKENZI
New Member
Join Date: Nov 2022
Old 11-28-2022 , 05:11   kill bonus about
Reply With Quote #1

hello, I am using the kill bonus plugin in the link, but I have a problem. When you kill the enemy, it doesn't give +10 hp. It gives +20hp. I want it to be 10...It also says "+10 health" even though the hp is 100 "Your health is full!!!" not writing
Attached Files
File Type: sma Get Plugin or Get Source (kill_bonus.sma - 64 views - 2.1 KB)

Last edited by RYOOKENZI; 11-28-2022 at 05:15.
RYOOKENZI is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 11-28-2022 , 14:15   Re: kill bonus about
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fun>

#define PLUGIN "Kill Bonus"
#define VERSION "1.3"
#define AUTHOR "Vaflan"
#define MODE "Kill Bonus"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_cvar("amx_kill_bonus""10")
    
register_cvar("amx_kill_bonus_maximum""100")
    
register_cvar("amx_kill_bonus_flashlight""0")
    
register_event("DeathMsg""hp_up""a")
    
register_clcmd("say /hp","show_hp")
}

public 
hp_up() {
    static 
id
    id 
read_data(1)

    if(
id && is_user_alive(id)) {
        new 
set_health get_user_health(id) + get_cvar_num("amx_kill_bonus")
        if(
set_health == get_cvar_num("amx_kill_bonus_maximum")) {
            
set_hudmessage(255000.040.9203.03.00.20.210)
            
show_hudmessage(id,"HP FULL!!!")
        }
        else {
            if(
set_health get_cvar_num("amx_kill_bonus_maximum"))
                
set_health get_cvar_num("amx_kill_bonus_maximum")

            
set_user_health(idset_health)
            
set_hudmessage(02550, -1.00.1501.01.00.10.1)
            
show_hudmessage(id,"+%d HP KAZANDIN!!!"get_cvar_num("amx_kill_bonus"))
        }

        if(
get_cvar_num("amx_kill_bonus_flashlight")) {
            
// It's flashlight like level up
            
new Float:origin[3]
            
pev(idpev_originorigin)
            
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
            
write_byte(27)
            
write_coord(floatround(origin[0]))
            
write_coord(floatround(origin[1]))
            
write_coord(floatround(origin[2]))
            
write_byte(50)
            
write_byte(random(255))
            
write_byte(random(0))
            
write_byte(random(0))
            
write_byte(8)
            
write_byte(60)
            
message_end()
        }
    }
    return 
PLUGIN_CONTINUE
}

public 
show_hp(id) {
    new 
player_name[32]
    
get_user_name(idplayer_name31)
    
client_print(0print_chat"[%s] %s has %i health and %i armor."MODEplayer_nameget_user_health(id), get_user_armor(id))

    return 
PLUGIN_CONTINUE
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/ 
Try this, there's a cvar called "amx_kill_bonus_maximum" which is set to 100 by default. Change it to your desires.
__________________
Napoleon_be is online now
Send a message via Skype™ to Napoleon_be
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 12:08.


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