View Single Post
walkero
Junior Member
Join Date: Feb 2011
Location: Bulgaria
Old 03-19-2011 , 11:03   Re: Bonust +20HP for 1 player every rounds
Reply With Quote #2

Found this somewhere on the forums long time ago

PHP Code:
#include <amxmodx>
#include <fun>
#include <colorchat>

public plugin_init()
{
    
register_event("HLTV""EventHLTV""a""1=0""2=0")
}

public 
EventHLTV()
{
    
set_task(0.1"GiveHealth")
}

public 
GiveHealth()
{
    new 
players[32], count
    get_players
(playerscount"a")
    
    if(
count)
    {
        new 
iPlayer players[random(count)]
        new 
name[32]
        
get_user_name(iPlayernamecharsmax(name))
        
set_user_health(iPlayerget_user_health(iPlayer)+25)
        
        
ColorChat(0TEAM_COLOR"^x04[HP]^x01 Gratz to^x03 %s^x01! He recieved^x04 +25^x01 hp."name)
    }

walkero is offline
Send a message via Skype™ to walkero