Hp Reward

Forumas skirtas spręsti problemas iškilusias su CS 1.6 serveriais.
Post Reply
User avatar
Niuton
O taip. Jis jau surinko 50 žinučių!
Posts: 78
Joined: 2013 Jan 18 12:09
Skype: Kasparaszu
Location: Kaunas

Hp Reward

Post by Niuton »

Gal kas žino kaip šitą pluginą paversti tik vipams ir adminams. O gal žinote kokiu pakaitalu šitam pluginui.

Code: Select all

#include <amxmodx>#include <fun> #define PLUGIN_VERSION "1.0c" new health_addnew health_hs_addnew health_max new nKillernew nKiller_hpnew nHp_addnew nHp_max public plugin_init(){   register_plugin("Vampire", PLUGIN_VERSION, "Shalfey")    health_add = register_cvar("amx_vampire_hp", "15")   health_hs_add = register_cvar("amx_vampire_hp_hs", "40")   health_max = register_cvar("amx_vampire_max_hp", "100")    register_event("DeathMsg", "hook_death", "a", "1>0")     } public hook_death(){   // Killer id   nKiller = read_data(1)    if ( (read_data(3) == 1) && (read_data(5) == 0) )   {      nHp_add = get_pcvar_num (health_hs_add)   }   else      nHp_add = get_pcvar_num (health_add)    nHp_max = get_pcvar_num (health_max)    // Updating Killer HP   nKiller_hp = get_user_health(nKiller)   nKiller_hp += nHp_add    // Maximum HP check   if (nKiller_hp > nHp_max) nKiller_hp = nHp_max    set_user_health(nKiller, nKiller_hp)    // Hud message "Healed +15/+40 hp"   set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)   show_hudmessage(nKiller, "Healed +%d hp", nHp_add)    // Screen fading   message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller)   write_short(1<<10)   write_short(1<<10)   write_short(0x0000)   write_byte(0)   write_byte(0)   write_byte(200)   write_byte(75)   message_end()   }  
Didelis dėkui visai Amxmodx.lt bendruomenei.

Unkolix
Gana aktyvus vartotojas
Posts: 211
Joined: 2013 Mar 29 21:53
Skype: unkolix
Location: Trakai

Re: Hp Reward

Post by Unkolix »

Kokį flag vipai turi? Su admin chat žmonėm, duos hp.

Code: Select all

#include <amxmodx>#include <fun> #define PLUGIN_VERSION "1.0c" #define VIP_FLAG ADMIN_CHAT new health_addnew health_hs_addnew health_max new nKillernew nKiller_hpnew nHp_addnew nHp_max public plugin_init(){    register_plugin("Vampire", PLUGIN_VERSION, "Shalfey")        health_add = register_cvar("amx_vampire_hp", "15")    health_hs_add = register_cvar("amx_vampire_hp_hs", "40")    health_max = register_cvar("amx_vampire_max_hp", "100")        register_event("DeathMsg", "hook_death", "a", "1>0")    } public hook_death(){    // Killer id    nKiller = read_data(1)        if(get_user_flags(nKiller) & VIP_FLAG)    {                if ( (read_data(3) == 1) && (read_data(5) == 0) )        {            nHp_add = get_pcvar_num (health_hs_add)        }        else            nHp_add = get_pcvar_num (health_add)                nHp_max = get_pcvar_num (health_max)                // Updating Killer HP        nKiller_hp = get_user_health(nKiller)        nKiller_hp += nHp_add                // Maximum HP check        if (nKiller_hp > nHp_max) nKiller_hp = nHp_max                set_user_health(nKiller, nKiller_hp)                // Hud message "Healed +15/+40 hp"        set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)        show_hudmessage(nKiller, "Healed +%d hp", nHp_add)                // Screen fading        message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller)        write_short(1<<10)        write_short(1<<10)        write_short(0x0000)        write_byte(0)        write_byte(0)        write_byte(200)        write_byte(75)        message_end()    }}
Skype - Unkolix

User avatar
Niuton
O taip. Jis jau surinko 50 žinučių!
Posts: 78
Joined: 2013 Jan 18 12:09
Skype: Kasparaszu
Location: Kaunas

Re: Hp Reward

Post by Niuton »

Dėkui.
Didelis dėkui visai Amxmodx.lt bendruomenei.

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests