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

Suggestion / Subplugin Request [REQ] Class ZP 1.6.1


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
klosar007
Member
Join Date: Jan 2014
Old 12-04-2014 , 16:23   [REQ] Class ZP 1.6.1
Reply With Quote #1

hey evryone !
i need zombie class like this
1 : whene kill some one get glow (5 sec) & get 250 hp with hud message
2 : zombie regeneration evry 10 sec with 300 hp (+ sprite like whene sniper kill someone)
any one work that for me pls (im not good in scripting)

[Sorry for bad EngliSh]
klosar007 is offline
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 12-04-2014 , 20:03   Re: [REQ] Class ZP 1.6.1
Reply With Quote #2

1.) You mean when zombie infects a human gains glow and hp?

2.)
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

const TASKID_REG 1000001

new g_timeg_amount

new const zclass_name[] = { "Regenerator" }
new const 
zclass_info[] = { "Regeneration" }
new const 
zclass_model[] = { "zombie_source" }
new const 
zclass_clawmodel[] = { "v_knife_zombie.mdl" }
const 
zclass_health 5750
const zclass_speed 250
const Float:zclass_gravity 1.0
const Float:zclass_knockback 1.0

const Float:HUD_EVENT_X = -1.0
const Float:HUD_EVENT_Y 0.1

new g_zclass_Regen
new g_MaxPlayers
new g_MsgSync

public plugin_init()
{
    
g_time register_cvar("zp_regen_time""10")
    
g_amount register_cvar("zp_regen_amount""300")
        
        
g_MsgSync CreateHudSyncObj()

    
g_MaxPlayers get_maxplayers()
}

public 
plugin_precache()
{
    
register_plugin("[ZP] Zclass : Zombie Regenerator""1.0""The_Thing")

    
g_zclass_Regen zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
}

public 
zp_round_ended()
{
    for(new 
id 1id <= g_MaxPlayersid++)
    {
        if(
task_exists(id TASKID_REG)) remove_task(id TASKID_REG)
    }
}

public 
zp_user_infected_post(playerinfector)
{
    if (
zp_get_user_zombie_class(player) == g_zclass_Regen)
        
set_task(get_pcvar_float(g_time), "Regenerate"player TASKID_REG__"b")
}

public 
Regenerate(id)
{
    new 
player id TASKID_REG

    
if (!is_user_connected(player) || !is_user_alive(player) || !zp_get_user_zombie(player))
    {
        
remove_task(player TASKID_REG)

        return
    }

    if(
pev(playerpev_health) <= 10.0)
    {
        
remove_task(player TASKID_REG)

        return
    }

    new 
ZMaxHealth zp_get_zombie_maxhealth(player)

    if(
pev(playerpev_health) < ZMaxHealth)
    {
        new 
RegenHealth pev(playerpev_health) + get_pcvar_num(g_amount)
        
set_pev(playerpev_healthfloat(min(RegenHealthZMaxHealth)))
                
set_hudmessage(25520255HUD_EVENT_XHUD_EVENT_Y10.03.00.0, -1.0)
                
ShowSyncHudMsg(playerg_MsgSync"== Regeneration ==^n!!! +%d Health Gained !!!"get_pcvar_num(g_amount))
        
        static 
origin[3]
        
get_user_origin(playerorigin)
        
message_begin(MSG_PVSSVC_TEMPENTITYorigin)
        
write_byte(TE_PARTICLEBURST// TE id
        
write_coord(origin[0]) // x
        
write_coord(origin[1]) // y
        
write_coord(origin[2]) // z
        
write_short(50// radius
        
write_byte(70// color
        
write_byte(3// duration (will be randomized a bit)
        
message_end()
    }


Last edited by wicho; 12-05-2014 at 00:16.
wicho is offline
klosar007
Member
Join Date: Jan 2014
Old 12-05-2014 , 06:41   Re: [REQ] Class ZP 1.6.1
Reply With Quote #3

Quote:
Originally Posted by wicho View Post
1.) You mean when zombie infects a human gains glow and hp?

2.)
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

const TASKID_REG 1000001

new g_timeg_amount

new const zclass_name[] = { "Regenerator" }
new const 
zclass_info[] = { "Regeneration" }
new const 
zclass_model[] = { "zombie_source" }
new const 
zclass_clawmodel[] = { "v_knife_zombie.mdl" }
const 
zclass_health 5750
const zclass_speed 250
const Float:zclass_gravity 1.0
const Float:zclass_knockback 1.0

const Float:HUD_EVENT_X = -1.0
const Float:HUD_EVENT_Y 0.1

new g_zclass_Regen
new g_MaxPlayers
new g_MsgSync

public plugin_init()
{
    
g_time register_cvar("zp_regen_time""10")
    
g_amount register_cvar("zp_regen_amount""300")
        
        
g_MsgSync CreateHudSyncObj()

    
g_MaxPlayers get_maxplayers()
}

public 
plugin_precache()
{
    
register_plugin("[ZP] Zclass : Zombie Regenerator""1.0""The_Thing")

    
g_zclass_Regen zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
}

public 
zp_round_ended()
{
    for(new 
id 1id <= g_MaxPlayersid++)
    {
        if(
task_exists(id TASKID_REG)) remove_task(id TASKID_REG)
    }
}

public 
zp_user_infected_post(playerinfector)
{
    if (
zp_get_user_zombie_class(player) == g_zclass_Regen)
        
set_task(get_pcvar_float(g_time), "Regenerate"player TASKID_REG__"b")
}

public 
Regenerate(id)
{
    new 
player id TASKID_REG

    
if (!is_user_connected(player) || !is_user_alive(player) || !zp_get_user_zombie(player))
    {
        
remove_task(player TASKID_REG)

        return
    }

    if(
pev(playerpev_health) <= 10.0)
    {
        
remove_task(player TASKID_REG)

        return
    }

    new 
ZMaxHealth zp_get_zombie_maxhealth(player)

    if(
pev(playerpev_health) < ZMaxHealth)
    {
        new 
RegenHealth pev(playerpev_health) + get_pcvar_num(g_amount)
        
set_pev(playerpev_healthfloat(min(RegenHealthZMaxHealth)))
                
set_hudmessage(25520255HUD_EVENT_XHUD_EVENT_Y10.03.00.0, -1.0)
                
ShowSyncHudMsg(playerg_MsgSync"== Regeneration ==^n!!! +%d Health Gained !!!"get_pcvar_num(g_amount))
        
        static 
origin[3]
        
get_user_origin(playerorigin)
        
message_begin(MSG_PVSSVC_TEMPENTITYorigin)
        
write_byte(TE_PARTICLEBURST// TE id
        
write_coord(origin[0]) // x
        
write_coord(origin[1]) // y
        
write_coord(origin[2]) // z
        
write_short(50// radius
        
write_byte(70// color
        
write_byte(3// duration (will be randomized a bit)
        
message_end()
    }

first thanks for 2
for 1/ i want zombie whene kill player get glow (5second) + 250 hp !
klosar007 is offline
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 21:42.


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