Raised This Month: $ Target: $400
 0% 

Help Zombie Plague Advanced Xp


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AdrianxD
New Member
Join Date: Aug 2012
Old 04-20-2013 , 08:19   Help Zombie Plague Advanced Xp
Reply With Quote #1

Hello!
Are from Romania!
I need help with how advanced the xp zombie plague!
If you have access to one class I and class access to number 1 on the next page!

Class number one
Quote:
/*============================================ ====================================
Human Test
============================================= ===================================*/

#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

//registers human class plugins
native zpxp_register_human_class(const name[], const info[], const model[], const weapons[], hp, speed, Float:gravity, level)

//registers zombie classes (vital so our mod can see whats available + level)
native zpxp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hp, speed, Float:gravity, Float:knockback, level)

//checking for human registers
native zp_get_user_human_class(id)

//same as event_round_start, for human plugins
forward zp_round_started_human(id)

/*============================================ ====================================
For giving guns to humans, here is what you need to know

-----Primary Guns-----
"weapon_galil", "weapon_famas", "weapon_m4a1", "weapon_ak47", "weapon_sg552", "weapon_aug", "weapon_scout",
"weapon_m3", "weapon_xm1014", "weapon_tmp", "weapon_mac10", "weapon_ump45", "weapon_mp5navy", "weapon_p90"

-----Secondary Guns-----
"weapon_glock18", "weapon_usp", "weapon_p228", "weapon_deagle", "weapon_fiveseven", "weapon_elite"

-----Additional Items-----
"weapon_hegrenade", "weapon_flashbang", "weapon_smokegrenade"

============================================= ====================================*/

enum
{
WEAPON_GALIL = 1,
WEAPON_FAMAS,
WEAPON_M4A1,
WEAPON_AK47,
WEAPON_SG552,
WEAPON_AUG,
WEAPON_SCOUT,
WEAPON_M3,
WEAPON_XM1040,
WEAPON_TMP,
WEAPON_MAC10,
WEAPON_UMP45,
WEAPON_MP5NAVY,
WEAPON_P90,
WEAPON_GLOCK18,
WEAPON_USP,
WEAPON_P228,
WEAPON_DEAGLE,
WEAPON_FIVESEVEN,
WEAPON_ELITE,
WEAPON_HEGRENADE,
WEAPON_FLASHBANG,
WEAPON_SMOKEGRENADE
}

// Zombie Attributes
new const zclass_name[] = { "Classic Zombie" } // name
new const zclass_info[] = { "Extra health" } // description
new const zclass_model[] = { "zombie1_xp" } // model
new const zclass_clawmodel[] = { "v_classic1_xp.mdl" } // claw model
const zclass_health = 4000*2// health
const zclass_speed = 250 // speed
const Float:zclass_gravity = 1.0 // gravity
const Float:zclass_kb = 3.0 // knockback
const zclass_level = 1 // level required to use

// Class IDs
new g_zclassid

public plugin_init()
{

}

// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
new registerText[32]
formatex( registerText, sizeof registerText - 1, "[ZPXP] %s zombie", zclass_name)
register_plugin(registerText, "1.0", "N3messys")

// Register the new class and store ID for reference
g_zclassid = zpxp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_kb, zclass_level)

if(g_zclassid == +1)
{
server_print("[ZPXP] Nu a-ti setat corespunzator Zombie XP Mod.");
}
}

// User Infected forward
public zp_user_infected_post(id, infector)
{
// Check if the infected player is using our custom zombie class
if (zp_get_user_zombie_class(id) != g_zclassid) return;

//client_print(id, print_chat, "[ZP] Esti %s Zombie", zclass_name)
}

public zp_user_humanized_post(id)
{
if (zp_get_user_zombie_class(id) != g_zclassid) return;

//user turned human
zp_round_started_human(id);
}

public zp_round_started_human(id)
{
if (zp_get_user_zombie_class(id) != g_zclassid) return;

// User turned human
// Undo any additional changes we have made here

}










First class on the second page:

Quote:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <zombieplague>

#define PLUGNAME "[ZP] Zombie Respawn"
#define AUTHOR "CHyC/PomanoB"
#define VERSION "4.0"

//registers human class plugins
native zpxp_register_human_class(const name[], const info[], const model[], const weapons[], hp, speed, Float:gravity, level)

//registers zombie classes (vital so our mod can see whats available + level)
native zpxp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hp, speed, Float:gravity, Float:knockback, level)

//checking for human registers
native zp_get_user_human_class(id)

//same as event_round_start, for human plugins
forward zp_round_started_human(id)

/*============================================ ====================================
For giving guns to humans, here is what you need to know

-----Primary Guns-----
"weapon_galil", "weapon_famas", "weapon_m4a1", "weapon_ak47", "weapon_sg552", "weapon_aug", "weapon_scout",
"weapon_m3", "weapon_xm1014", "weapon_tmp", "weapon_mac10", "weapon_ump45", "weapon_mp5navy", "weapon_p90"

-----Secondary Guns-----
"weapon_glock18", "weapon_usp", "weapon_p228", "weapon_deagle", "weapon_fiveseven", "weapon_elite"

-----Additional Items-----
"weapon_hegrenade", "weapon_flashbang", "weapon_smokegrenade"

============================================= ====================================*/

enum
{
WEAPON_GALIL = 1,
WEAPON_FAMAS,
WEAPON_M4A1,
WEAPON_AK47,
WEAPON_SG552,
WEAPON_AUG,
WEAPON_SCOUT,
WEAPON_M3,
WEAPON_XM1040,
WEAPON_TMP,
WEAPON_MAC10,
WEAPON_UMP45,
WEAPON_MP5NAVY,
WEAPON_P90,
WEAPON_GLOCK18,
WEAPON_USP,
WEAPON_P228,
WEAPON_DEAGLE,
WEAPON_FIVESEVEN,
WEAPON_ELITE,
WEAPON_HEGRENADE,
WEAPON_FLASHBANG,
WEAPON_SMOKEGRENADE
}

new const zclass_name[] = { "Dragon-Respawn Zombie" }
new const zclass_info[] = { "Respawn - GR++" }
new const zclass_model[] = { "v_dragon" }
new const zclass_clawmodel[] = { "v_m_dragon.mdl" }
const zclass_health = 7500*2
const zclass_speed = 780
const Float:zclass_gravity = 0.5
const Float:zclass_knockback = 1.0
const zclass_level = 105 // level required to use

new bool:g_end

new g_respawn_count[33]

new cvar_maxspawn , cvar_spawndelay , cvar_color , cvar_colorspawn , cvar_amount , cvar_time;

new g_zclass_respawn


public plugin_precache()
{
g_zclass_respawn = zpxp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback, zclass_level)
}

public plugin_init()
{
register_plugin("[ZPXP] Respawn Zombie","1.0","N3messys");
RegisterHam(Ham_Killed, "player", "PlayerKilled", 1);
register_cvar("zp_respawn", VERSION, FCVAR_SERVER)

cvar_maxspawn = register_cvar("zp_max_spawn" , "3");
cvar_spawndelay = register_cvar("zp_spawn_time" , "5.0");
cvar_color = register_cvar("zp_color" , "1");
cvar_colorspawn = register_cvar("zp_color_spawn" , "0 255 0");
cvar_amount = register_cvar("zp_color_amount" , "30");
cvar_time = register_cvar("zp_color_time" , "10.0");
}

public PlayerKilled(Victim)

if (zp_get_user_zombie(Victim) && zp_get_user_zombie_class(Victim) == g_zclass_respawn && !zp_get_user_nemesis(Victim))
set_task((get_pcvar_float(cvar_spawndelay)), "PlayerRespawn", Victim);

public PlayerRespawn(id)
{
if (g_respawn_count[id]++>=get_pcvar_num(cvar_maxspawn))
return PLUGIN_CONTINUE;

if (!g_end && !is_user_alive(id) && zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_zclass_respawn && !zp_get_user_nemesis(id))
{
remove_task(id);
zp_respawn_user(id, ZP_TEAM_ZOMBIE)


if(get_pcvar_num(cvar_color))
{
new szColor[12], szRed[4], szGreen[4], szBlue[4]
get_pcvar_string(cvar_colorspawn,szColor,11)
parse(szColor,szRed,3,szGreen,3,szBlue,4)

new iRed = clamp(str_to_num(szRed),0,255)
new iGreen = clamp(str_to_num(szGreen),0,255)
new iBlue = clamp(str_to_num(szBlue),0,255)

set_user_rendering(id,kRenderFxGlowShell,iRed ,iGreen,iBlue,kRenderNormal,get_pcvar_num(cva r_amount))
set_task(get_pcvar_float(cvar_time),"event_ti me_color",id)

}
}
return PLUGIN_CONTINUE;
}

public event_time_color(id)
{
set_user_rendering(id,kRenderFxNone,0,0,0,kRe nderNormal,0)
}

public zp_round_ended(winteam)
{
g_end = true
}

public zp_round_started(gamemode, player)
{
g_end = false
arrayset(g_respawn_count,0,33)
}

Sorry if I had unpleasant expressions

Last edited by AdrianxD; 04-20-2013 at 08:27.
AdrianxD is offline
Reply


Thread Tools
Display Modes

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 10:55.


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