AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission [ZP] Zombie Class: Clot Zombie (https://forums.alliedmods.net/showthread.php?t=181258)

DJHD! 03-27-2012 02:16

[ZP] Zombie Class: Clot Zombie
 
2 Attachment(s)
ZP Class: Clot Zombie KF v.0.2


Description:

Quote:

This zombie has the ability to stun the sight of humans is very similar to the famous game killing floor but it does not paralyze you.

NO CVARS


Customizations:
  • into the SMA file [zp_zclass_clot_zombie] but you must compile it locally
PHP Code:

/*================================================================================
 [Customizations]
=================================================================================*/

// Clot Zombie
new const zclass_name[] = { "Zombie Clot" }
new const 
zclass_info[] = { "Stuns your eyes" }
new const 
zclass_model[] = { "Clot" }
new const 
zclass_clawmodel[] = { "v_clot_claws.mdl" }
const 
zclass_health 900
const zclass_speed 250
const Float:zclass_gravity 0.60
const Float:zclass_knockback 1.0

/*================================================================================
 Customization ends here!
 Any edits will be your responsibility
=================================================================================*/ 


Changelog:

Rant:
V0.1: Public Release
V0.2: Added a check thanks H.RED.ZONE


Have Fun

meTaLiCroSS 03-27-2012 21:26

Re: [ZP] Zombie Class: Clot Zombie
 
Nice attempt to copy my server's clot zombie.

If I didn't create my actual clot zombie you didn't tryed to make this plugin, like the Fleshpound haha, don't worry about it, we gonna see if you are going to be always behind me and my great creations :)

DJHD! 03-27-2012 22:36

Re: [ZP] Zombie Class: Clot Zombie
 
HAHAHA I do not mind I retired from the internet and publishes all my plugins but I do not really haha was good to share all the time in your zp but it was goodbye.

naSTR 05-02-2012 17:22

Re: [ZP] Zombie Class: Clot Zombie
 
Error log in debug mod
PHP Code:

L 03/27/2012 20:45:38: [XopoMInvalid Player (0)
L 03/27/2012 20:45:38: [AMXXDisplaying debug trace (plugin "zp_zclass_clot.amxx")
L 03/27/2012 20:45:38: [AMXXRun time error 10native error (native "zp_get_user_zombie_class")
L 03/27/2012 20:45:38: [AMXX]    [0zp_class_clockdoo.sma::fw_TakeDamage (line 63


H.RED.ZONE 05-02-2012 18:26

Re: [ZP] Zombie Class: Clot Zombie
 
PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <hamsandwich>
#include <zombieplague>

/*================================================================================
[Constants, Offsets, Macros]
=================================================================================*/

// Plugin Version
new const PLUGIN_VERSION[] = "0.1"

// Clot Zombie
new const zclass_name[] = { "Zombie Clot" }
new const 
zclass_info[] = { "Stuns your eyes" }
new const 
zclass_model[] = { "Clot" }
new const 
zclass_clawmodel[] = { "v_clot_claws.mdl" }
const 
zclass_health 900
const zclass_speed 250
const Float:zclass_gravity 0.60
const Float:zclass_knockback 1.0

/*================================================================================
[Global Variables]
=================================================================================*/

// Game vars
new g_clot // index from the class

public plugin_init()
{
    
register_plugin("[ZP] ZP Class: Clot"PLUGIN_VERSION"DJHD!")
    
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
}

public 
plugin_precache()
{
    
g_clot zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
    
    
precache_sound("zombie_plague/clot_grab.wav")
}

/*================================================================================
[Main Forwards]
=================================================================================*/

public zp_user_infected_post(idinfector)
{
    if (
zp_get_user_zombie_class(id) == g_clot)
    {
        if(
zp_get_user_nemesis(id))
            return
        
        
print_chatColor(id"\g[ZP]\n At the time of attack will leave them stunned."
    }
}

// Ham Take Damage Forward
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    if(!
is_user_alive(victim) || !is_user_alive(inflictor) || !is_user_alive(attacker))
    return
    if(
zp_get_user_zombie_class(attacker) == g_clot && !zp_get_user_zombie(victim))
    {
        if(
zp_get_user_nemesis(attacker))
            return
        
        
message_begin(MSG_ONEget_user_msgid("ScreenFade"), _victim)
        
write_short((1<<12)) // duration
        
write_short(0// hold time
        
write_short(0x0000// fade type
        
write_byte(180// red
        
write_byte(0// green
        
write_byte(0// blue
        
write_byte(200// alpha
        
message_end()
        
        new 
Float:fVec[3]
        
fVec[0] = random_float(50.0150.0)
        
fVec[1] = random_float(50.0150.0)
        
fVec[2] = random_float(50.0150.0)
        
        
set_pev(victimpev_punchanglefVec)
    }
}

/*================================================================================
[Stocks]
=================================================================================*/

stock print_chatColor(const id,const input[], any:...)
{
    new 
msg[191], players[32], count 1;
    
vformat(msg,190,input,3);
    
replace_all(msg,190,"\g","^4");// green
    
replace_all(msg,190,"\n","^1");// normal
    
replace_all(msg,190,"\t","^3");// team
    
    
if (idplayers[0] = id; else get_players(players,count,"ch");
    for (new 
i=0;i<count;i++)
        if (
is_user_connected(players[i]))
    {
        
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("SayText"),_,players[i]);
        
write_byte(players[i]);
        
write_string(msg);
        
message_end();
    }



DJHD! 05-06-2012 22:25

Re: [ZP] Zombie Class: Clot Zombie
 
Plugin Updated V0.2

naSTR 05-07-2012 04:45

Re: [ZP] Zombie Class: Clot Zombie
 
Can someone add screenshake and fade ability. It can be changed by cvar. Which means u can change ability using cvar :3

H.RED.ZONE 05-07-2012 10:13

Re: [ZP] Zombie Class: Clot Zombie
 
Add it your self example:

Code:

public shake(id)
{
    message_begin (MSG_ONE_UNRELIABLE, gmsgShake, {0,0,0}, id)
    write_short (1<<6)
    write_short (1<<13)
    write_short (1<<12)
    message_end ()
}

Code:

public blind(id)
{
    message_begin(MSG_ONE_UNRELIABLE, gmsgFade,{0,0,0},id)
    write_short(1<<2)
    write_short(1<<11) 
    write_short(1<<12) 
    write_byte(255)
    write_byte(255)
    write_byte(255)
    write_byte(250)
    message_end()
}


naSTR 05-07-2012 12:44

Re: [ZP] Zombie Class: Clot Zombie
 
Can be like this? Ive copied some codes from siren class

PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <hamsandwich>
#include <hlsdk_const>
#include <zombieplague>

new const PLUGIN_VERSION[] = "0.2"

new const zclass_name[] = { "Zombie Clot" }
new const 
zclass_info[] = { "Stuns your eyes" }
new const 
zclass_model[] = { "zombie_source" }
new const 
zclass_clawmodel[] = { "v_knife_zombie.mdl" }
const 
zclass_health 150
const zclass_speed 200
const Float:zclass_gravity 1.00
const Float:zclass_knockback 1.0

const UNIT_SECOND =         (1<<12)

new 
g_clotg_msgScreenShake

public plugin_init()
{
    
register_plugin("[ZP] ZM Class: Clot"PLUGIN_VERSION"DJHD!")
    
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
    
g_msgScreenShake get_user_msgid("ScreenShake")
}

public 
plugin_precache()
    
g_clot zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)


public 
zp_user_infected_post(idinfector)
{
    if (
zp_get_user_zombie_class(id) == g_clot)
    {
        if(
zp_get_user_nemesis(id))
            return
        
        
print_chatColor(id"\g[XopoM]\n Clot zombie maijij \gmanargah\n chadvartai"
    }
}

// Ham Take Damage Forward
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    if(!
is_user_alive(victim) || !is_user_alive(inflictor) || !is_user_alive(attacker))
        return
        
    if(
zp_get_user_zombie_class(attacker) == g_clot && !zp_get_user_zombie(victim))
    {
        if(
zp_get_user_nemesis(attacker))
            return
        
        
message_begin(MSG_ONEget_user_msgid("ScreenFade"), _victim)
        
write_short((1<<12)) // duration
        
write_short(0// hold time
        
write_short(0x0000// fade type
        
write_byte(180// red
        
write_byte(0// green
        
write_byte(0// blue
        
write_byte(200// alpha
        
message_end()
        
        
// Screen Shake
        
message_begin(MSG_ONE_UNRELIABLEg_msgScreenShake_victim)
        
write_short(UNIT_SECOND*5// amplitude
        
write_short(UNIT_SECOND*1// duration
        
write_short(UNIT_SECOND*5// frequency
        
message_end()
    }
}

/*================================================================================
[Stocks]
=================================================================================*/

stock print_chatColor(const id,const input[], any:...)
{
    new 
msg[191], players[32], count 1;
    
vformat(msg,190,input,3);
    
replace_all(msg,190,"\g","^4");// green
    
replace_all(msg,190,"\n","^1");// normal
    
replace_all(msg,190,"\t","^3");// team
    
    
if (idplayers[0] = id; else get_players(players,count,"ch");
    for (new 
i=0;i<count;i++)
        if (
is_user_connected(players[i]))
    {
        
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("SayText"),_,players[i]);
        
write_byte(players[i]);
        
write_string(msg);
        
message_end();
    }



H.RED.ZONE 05-07-2012 13:28

Re: [ZP] Zombie Class: Clot Zombie
 
Just change MSG_ONE
to MSG_ONE_UNRELIABLE = prevent crash.
And then test it.


All times are GMT -4. The time now is 15:11.

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