Raised This Month: $ Target: $400
 0% 

Suggestion / Subplugin Request [REQ] Converting Zombie Class to zp 5.0.8


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ESPADONGAMING
Senior Member
Join Date: Mar 2011
Location: In the Game [ro]
Old 04-12-2012 , 05:36   [REQ] Converting Zombie Class to zp 5.0.8
Reply With Quote #1

PHP Code:
/* ====================
   Includes
==================== */
#include <  amxmodx   >
#include <      fun     >
#include <    hamsandwich        >

native zp_get_user_zombie(id);
native zp_get_user_zombie_class(id);
native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hpspeedFloat:gravityFloat:knockback);
forward zp_user_infected_post(idinfectornemesis);

/* ==============================
   Screen Fade Stuff
============================== */
#define FADE_IN      0x0000
#define FADE_OUT      0x0001
#define FADE_MODULATE   0x0002
#define FADE_STAYOUT   0x0004


/* ==============================
   The zombie class ID
============================== */
new g_zclass_hunter;


/* ===========================================
   Zombie class information(s) && Models
=========================================== */
new const zclass1_name[] =      {   "Hunter"         };
new const 
zclass1_info[] =      {   "[Silent Killer]"         };
new const 
zclass1_model[] =      {   "zombie_source"         };
new const 
zclass1_clawmodel[] =   {   "v_knife_zombie.mdl"   };


/* ================
   Atribs
================ */
const zclass1_health =   4500;
const 
zclass1_speed =   274;
const 
zclass1_infecthp =   250;


/* =======================
   HUD Positions
======================= */
const Float:HUD_EVENT_X = -1.0
const Float:HUD_EVENT_Y 0.1


/* ==================================
   Gravity && Knockback (Floats)
================================== */
const Float:zclass1_gravity =      0.62;
const 
Float:zclass1_knockback =   0.95;


/* ==========================
   Hud Message Sync
========================== */
new g_MsgSync88998899;


/* ====================
   Plugin init
==================== */
public plugin_init()
{
   
register_plugin(    "[ZP] ZClass Hunter""1.0""Hattrick"          );
   
RegisterHam(          Ham_Killed"player""fw_PlayerKilled"            );
   
g_zclass_hunter zp_register_zombie_class(     zclass1_namezclass1_infozclass1_modelzclass1_clawmodelzclass1_healthzclass1_speedzclass1_gravityzclass1_knockback     );
   
g_MsgSync88998899 CreateHudSyncObj(      );
}


/* ======================================
   When HUNTER kill other human
====================================== */
public fw_PlayerKilled(        victimattackershouldgib      )
{
   if (   
is_user_alive(            attacker     )   &&    zp_get_user_zombie(         attacker    )    &&         zp_get_user_zombie_class(        attacker     ) == g_zclass_hunter        )
   {
      
do_screen_fade(     attacker0.601.15255101094    );
      
do_field_of_view(    attackerrandom_num(      110121        )          );
      
SetHamParamInteger(          32      );
   }
   return 
PLUGIN_HANDLED;
}


/* ======================================
   When HUNTER infect other human
====================================== */
public zp_user_infected_post(   idinfector     )
{
   if (     
zp_get_user_zombie_class(    infector    ) == g_zclass_hunter    )
   {
      
set_user_health(   infectorget_user_health(      infector   ) + zclass1_infecthp     );
      
do_screen_fade(     infector0.601.15255101094    );
      
do_field_of_view(    infectorrandom_num(      110121        )          );
      
set_user_rendering(       infectorkRenderFxGlowShell2551010kRenderNormal27      );
      
set_task(      2.9"TakeGlow"infector     );
      
set_user_footsteps(      infector1     );
      
set_hudmessage(        02550HUD_EVENT_XHUD_EVENT_Y      );
      
ShowSyncHudMsg(       infectorg_MsgSync88998899"== HUNTER ==^n!!!Regeneration: +250 HP Gained!!!"      );
   }
}


/* ==============================
   Custom screen fade
============================== */
stock do_screen_fade(       idFloat:fadeTimeFloat:holdTimeredgreenbluealphatype FADE_IN       )
{
   static 
msgScreenFade;
   if (      !
msgScreenFade    ) { msgScreenFade get_user_msgid(    "ScreenFade"           ); }
   new 
fadehold;
   
fade clamp(    floatround(     fadeTime float(1<<12)), 00xFFFF    );
   
hold clamp(     floatround(         holdTime float(1<<12)), 00xFFFF      );
   
message_begin(    MSG_ONE_UNRELIABLEmsgScreenFade_id          );
   
write_short(          fade    );
   
write_short(    hold    );
   
write_short(    type   );
   
write_byte(      red    );
   
write_byte(  green    );
   
write_byte(    blue    );
   
write_byte(     alpha    );
   
message_end(    );
}


/* ==============================
   Custom field of view
============================== */
stock do_field_of_view(       idintensity     )
{
   static 
msgFieldOfView;
   if (        !
msgFieldOfView     ) { msgFieldOfView get_user_msgid(    "SetFOV"    ); }
   
message_begin(    MSG_ONEmsgFieldOfView_id     );
   
write_byte(    intensity     );
   
message_end(      );
}


/* ==============================
   Take glow at user
============================== */
public TakeGlow(       infector      ) { set_user_rendering(           infectorkRenderFxGlowShell000kRenderNormal0          ); } 
__________________
Skype: cristi.c94
SteamID: cristic_1994
ESPADONGAMING is offline
Send a message via MSN to ESPADONGAMING Send a message via Yahoo to ESPADONGAMING Send a message via Skype™ to ESPADONGAMING
ESPADONGAMING
Senior Member
Join Date: Mar 2011
Location: In the Game [ro]
Old 04-16-2012 , 22:36   Re: [REQ] Converting Zombie Class to zp 5.0.8
Reply With Quote #2

someone help me plz

..?
__________________
Skype: cristi.c94
SteamID: cristic_1994

Last edited by ESPADONGAMING; 04-20-2012 at 12:53.
ESPADONGAMING is offline
Send a message via MSN to ESPADONGAMING Send a message via Yahoo to ESPADONGAMING Send a message via Skype™ to ESPADONGAMING
ESPADONGAMING
Senior Member
Join Date: Mar 2011
Location: In the Game [ro]
Old 04-20-2012 , 12:53   Re: [REQ] Converting Zombie Class to zp 5.0.8
Reply With Quote #3

helppppp plzz
__________________
Skype: cristi.c94
SteamID: cristic_1994
ESPADONGAMING is offline
Send a message via MSN to ESPADONGAMING Send a message via Yahoo to ESPADONGAMING Send a message via Skype™ to ESPADONGAMING
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 04-20-2012 , 12:56   Re: [REQ] Converting Zombie Class to zp 5.0.8
Reply With Quote #4

Just set it like this it should read it like zp 4.3 i hate to transfer it sorry no time (: if you really want it send me pm tomorow..

PHP Code:
/* ====================
   Includes
==================== */
#include <  amxmodx   >
#include <      fun     >
#include <    hamsandwich        >
#include < zombieplague >

/* ==============================
   Screen Fade Stuff
============================== */
#define FADE_IN      0x0000
#define FADE_OUT      0x0001
#define FADE_MODULATE   0x0002
#define FADE_STAYOUT   0x0004


/* ==============================
   The zombie class ID
============================== */
new g_zclass_hunter;


/* ===========================================
   Zombie class information(s) && Models
=========================================== */
new const zclass1_name[] =      {   "Hunter"         };
new const 
zclass1_info[] =      {   "[Silent Killer]"         };
new const 
zclass1_model[] =      {   "zombie_source"         };
new const 
zclass1_clawmodel[] =   {   "v_knife_zombie.mdl"   };


/* ================
   Atribs
================ */
const zclass1_health =   4500;
const 
zclass1_speed =   274;
const 
zclass1_infecthp =   250;


/* =======================
   HUD Positions
======================= */
const Float:HUD_EVENT_X = -1.0
const Float:HUD_EVENT_Y 0.1


/* ==================================
   Gravity && Knockback (Floats)
================================== */
const Float:zclass1_gravity =      0.62;
const 
Float:zclass1_knockback =   0.95;


/* ==========================
   Hud Message Sync
========================== */
new g_MsgSync88998899;


/* ====================
   Plugin init
==================== */
public plugin_init()
{
   
register_plugin(    "[ZP] ZClass Hunter""1.0""Hattrick"          );
   
RegisterHam(          Ham_Killed"player""fw_PlayerKilled"            );
   
g_zclass_hunter zp_register_zombie_class(     zclass1_namezclass1_infozclass1_modelzclass1_clawmodelzclass1_healthzclass1_speedzclass1_gravityzclass1_knockback     );
   
g_MsgSync88998899 CreateHudSyncObj(      );
}


/* ======================================
   When HUNTER kill other human
====================================== */
public fw_PlayerKilled(        victimattackershouldgib      )
{
   if (   
is_user_alive(            attacker     )   &&    zp_get_user_zombie(         attacker    )    &&         zp_get_user_zombie_class(        attacker     ) == g_zclass_hunter        )
   {
      
do_screen_fade(     attacker0.601.15255101094    );
      
do_field_of_view(    attackerrandom_num(      110121        )          );
      
SetHamParamInteger(          32      );
   }
   return 
PLUGIN_HANDLED;
}


/* ======================================
   When HUNTER infect other human
====================================== */
public zp_user_infected_post(   idinfector     )
{
   if (     
zp_get_user_zombie_class(    infector    ) == g_zclass_hunter    )
   {
      
set_user_health(   infectorget_user_health(      infector   ) + zclass1_infecthp     );
      
do_screen_fade(     infector0.601.15255101094    );
      
do_field_of_view(    infectorrandom_num(      110121        )          );
      
set_user_rendering(       infectorkRenderFxGlowShell2551010kRenderNormal27      );
      
set_task(      2.9"TakeGlow"infector     );
      
set_user_footsteps(      infector1     );
      
set_hudmessage(        02550HUD_EVENT_XHUD_EVENT_Y      );
      
ShowSyncHudMsg(       infectorg_MsgSync88998899"== HUNTER ==^n!!!Regeneration: +250 HP Gained!!!"      );
   }
}


/* ==============================
   Custom screen fade
============================== */
stock do_screen_fade(       idFloat:fadeTimeFloat:holdTimeredgreenbluealphatype FADE_IN       )
{
   static 
msgScreenFade;
   if (      !
msgScreenFade    ) { msgScreenFade get_user_msgid(    "ScreenFade"           ); }
   new 
fadehold;
   
fade clamp(    floatround(     fadeTime float(1<<12)), 00xFFFF    );
   
hold clamp(     floatround(         holdTime float(1<<12)), 00xFFFF      );
   
message_begin(    MSG_ONE_UNRELIABLEmsgScreenFade_id          );
   
write_short(          fade    );
   
write_short(    hold    );
   
write_short(    type   );
   
write_byte(      red    );
   
write_byte(  green    );
   
write_byte(    blue    );
   
write_byte(     alpha    );
   
message_end(    );
}


/* ==============================
   Custom field of view
============================== */
stock do_field_of_view(       idintensity     )
{
   static 
msgFieldOfView;
   if (        !
msgFieldOfView     ) { msgFieldOfView get_user_msgid(    "SetFOV"    ); }
   
message_begin(    MSG_ONEmsgFieldOfView_id     );
   
write_byte(    intensity     );
   
message_end(      );
}


/* ==============================
   Take glow at user
============================== */
public TakeGlow(       infector      ) { set_user_rendering(           infectorkRenderFxGlowShell000kRenderNormal0          ); } 
__________________
H.RED.ZONE is offline
ESPADONGAMING
Senior Member
Join Date: Mar 2011
Location: In the Game [ro]
Old 04-20-2012 , 22:35   Re: [REQ] Converting Zombie Class to zp 5.0.8
Reply With Quote #5

ok, wait to do it for zp5.0

EDIT:
Solved by me
thanks anyway

PHP Code:
#include <amxmodx>
#include <fun>
#include <hamsandwich>
#include <zp50_class_zombie>

#define FADE_IN      0x0000
#define FADE_OUT      0x0001
#define FADE_MODULATE   0x0002
#define FADE_STAYOUT   0x0004

new const zclass_name[] = "Hunter"
new const zclass_info[] = "[Silent Killer]"
new const zclass_models[][] = { "BIG_Hunter" }
new const 
zclass_clawmodels[][] = { "models/zombie_plague/v_knife_zombie_hunter.mdl" }

const 
zclass_health 4500
const zclass_infecthp 250
const Float:zclass_speed 0.74
const Float:zclass_gravity 0.62
const Float:zclass_knockback 0.95

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

new g_ZombieClassID
new g_MsgSync88998899

public plugin_precache()
{
    
register_plugin("[ZP] ZClass Hunter""1.0""Hattrick & ESPADONGAMING")

    
RegisterHam(Ham_Killed"player""fw_PlayerKilled")
   
    new 
index
    
    g_ZombieClassID 
zp_class_zombie_register(zclass_namezclass_infozclass_healthzclass_speedzclass_gravity)
    
zp_class_zombie_register_kb(g_ZombieClassIDzclass_knockback)
    
    for (
index 0index sizeof zclass_modelsindex++)
        
zp_class_zombie_register_model(g_ZombieClassIDzclass_models[index])
        
    for (
index 0index sizeof zclass_clawmodelsindex++)
        
zp_class_zombie_register_claw(g_ZombieClassIDzclass_clawmodels[index])
    
    
g_MsgSync88998899 CreateHudSyncObj()
}

public 
fw_PlayerKilled(victimattackershouldgib)
{
    if (
is_user_alive(attacker) && zp_core_is_zombie(attacker) && zp_class_zombie_get_current(attacker) == g_ZombieClassID)
    {
        
do_screen_fade(attacker0.601.15255101094)
        
do_field_of_view(attackerrandom_num110121 ))
        
SetHamParamInteger(32)
    }
    return 
PLUGIN_HANDLED;
}

public 
zp_user_infected_post(idinfector)
{
    if (
zp_class_zombie_get_current(infector) == g_ZombieClassID)
    {
        
set_user_health(infectorget_user_health(infector) + zclass_infecthp)
        
do_screen_fade(infector0.601.15255101094)
        
do_field_of_view(infectorrandom_num(110121))
        
set_user_rendering(infectorkRenderFxGlowShell2551010kRenderNormal27)
        
set_task(2.9"TakeGlow"infector)
        
set_user_footsteps(infector1)
        
set_hudmessage(02550HUD_EVENT_XHUD_EVENT_Y)
        
ShowSyncHudMsg(infectorg_MsgSync88998899"== HUNTER ==^n!!!Regeneration: +250 HP Gained!!!")
    }
}

stock do_screen_fade(idFloat:fadeTimeFloat:holdTimeredgreenbluealphatype FADE_IN)
{
    static 
msgScreenFade
    
if ( !msgScreenFade ) { msgScreenFade get_user_msgid"ScreenFade" ); }
    new 
fadehold
    fade 
clamp(floatround(fadeTime float(1<<12)), 00xFFFF)
    
hold clamp(floatround(holdTime float(1<<12)), 00xFFFF)
    
message_begin(MSG_ONE_UNRELIABLEmsgScreenFade_id)
    
write_shortfade)
    
write_short(hold)
    
write_short(type)
    
write_byte(red)
    
write_byte(green)
    
write_byte(blue)
    
write_byte(alpha)
    
message_end()
}

stock do_field_of_view(idintensity)
{
    static 
msgFieldOfView
    
if (!msgFieldOfView) { msgFieldOfView get_user_msgid("SetFOV"); }
    
message_begin(MSG_ONEmsgFieldOfView_id)
    
write_byte(intensity)
    
message_end()
}

public 
TakeGlow(infector) { set_user_rendering(infectorkRenderFxGlowShell000kRenderNormal0); } 
__________________
Skype: cristi.c94
SteamID: cristic_1994

Last edited by ESPADONGAMING; 04-22-2012 at 22:46.
ESPADONGAMING is offline
Send a message via MSN to ESPADONGAMING Send a message via Yahoo to ESPADONGAMING Send a message via Skype™ to ESPADONGAMING
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 04-22-2012 , 23:17   Re: [REQ] Converting Zombie Class to zp 5.0.8
Reply With Quote #6

Quote:
Originally Posted by ESPADONGAMING View Post
ok, wait to do it for zp5.0

EDIT:
Solved by me
thanks anyway

Just one thing set

This

Code:
stock do_field_of_view(id, intensity)
{
    static msgFieldOfView
    if (!msgFieldOfView) { msgFieldOfView = get_user_msgid("SetFOV"); }
    message_begin(MSG_ONE, msgFieldOfView, _, id)
    write_byte(intensity)
    message_end()
}
to this

Code:
stock do_field_of_view(id, intensity)
{
    static msgFieldOfView
    if (!msgFieldOfView) { msgFieldOfView = get_user_msgid("SetFOV"); }
    message_begin(MSG_ONE_UNRELIABLE, msgFieldOfView, _, id)
    write_byte(intensity)
    message_end()
}
__________________

Last edited by H.RED.ZONE; 04-22-2012 at 23:18.
H.RED.ZONE is offline
ESPADONGAMING
Senior Member
Join Date: Mar 2011
Location: In the Game [ro]
Old 04-23-2012 , 00:14   Re: [REQ] Converting Zombie Class to zp 5.0.8
Reply With Quote #7

thanks
__________________
Skype: cristi.c94
SteamID: cristic_1994
ESPADONGAMING is offline
Send a message via MSN to ESPADONGAMING Send a message via Yahoo to ESPADONGAMING Send a message via Skype™ to ESPADONGAMING
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 08:51.


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