zombie plague

Discutii legate de instalarea, configurarea si modificarea unui server de Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
shut.theart
Membru, skill +3
Membru, skill +3
Posts: 1230
Joined: 10 Aug 2012, 13:04
Detinator Steam: Da
Has thanked: 52 times
Been thanked: 20 times
Contact:

12 Apr 2013, 16:29

Salut!!
Am o problema. De curand mi-am deschis un server de Zombie Plague pe Xp. Totul mergea bine pana cand am vazut alti playeri care jucau cu alte classe de zombie chiar daca nu aveau levelul respectiv (aveau acces la alte classe fara ca ei sa cumpere lvl)

De ex:
Are level 1 - Are si acces la prima classa de pe pagina urmatoare
Are level 2 - Are si acces la a doua classa de zombie de pe pagina urmatoare

Classa 1 de zombie:
| Afiseaza codul
/*================================================================================
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
	
}
Prima classa de pe a doua pagina:
| Afiseaza codul
#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(cvar_amount))
			set_task(get_pcvar_float(cvar_time),"event_time_color",id)
			
		}
	}
	return PLUGIN_CONTINUE;
}

public event_time_color(id)
{
	set_user_rendering(id,kRenderFxNone,0,0,0,kRenderNormal,0)
}

public zp_round_ended(winteam)
{
	g_end = true
}

public zp_round_started(gamemode, player)
{
	g_end = false
	arrayset(g_respawn_count,0,33)
}
INC Zombie XP :
| Afiseaza codul
/*================================================================================
	Zombie XP Include
=================================================================================*/

/*#if defined _zombieplague_included
  #endinput
#endif
#define _zombieplague_included
*/

//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
}
Folosesc ca plugin de baza Zombie Plague Advanced 1.6.1
Astept raspuns!!
Ms mult!

RoyalServer 2
User avatar
shut.theart
Membru, skill +3
Membru, skill +3
Posts: 1230
Joined: 10 Aug 2012, 13:04
Detinator Steam: Da
Has thanked: 52 times
Been thanked: 20 times
Contact:

13 Apr 2013, 14:38

Cineva?

User avatar
shut.theart
Membru, skill +3
Membru, skill +3
Posts: 1230
Joined: 10 Aug 2012, 13:04
Detinator Steam: Da
Has thanked: 52 times
Been thanked: 20 times
Contact:

14 Apr 2013, 15:23

Poate sa-mi spuna cineva care este problema?

User avatar
shut.theart
Membru, skill +3
Membru, skill +3
Posts: 1230
Joined: 10 Aug 2012, 13:04
Detinator Steam: Da
Has thanked: 52 times
Been thanked: 20 times
Contact:

15 Apr 2013, 19:16

Cineva pe aici?
Ma poate ajuta careva? :| dati-mi id vostru prin pm

User avatar
cosi
Fost moderator
Fost moderator
Posts: 745
Joined: 10 Mar 2011, 21:06
Detinator Steam: Da
CS Status: Let's Go
Detinator server CS: ZP.XGAMERS.RO
SteamID: cosi_adr94
Reputatie: Fost moderator !
Location: Tecuci
Been thanked: 86 times
Contact:

16 Apr 2013, 10:07

e greu sa gasesti o solutie pentru asa ceva. ai incercat sa schimbi pluginul de baza..sau pluginul cu clasele de zombie.??.. incearca si cauta si tu solutii pe alliedmods
Image
1)Esti pe Forumul http://www.extreamcs.com
2)Privesti Semnatura mea
3)Acum citesti punctul 3
5)Nu ai observat ca lipseste punctul 4
6)Tocmai ai verificat daca exista punctul 4 ??
7)Zambesti sau chiar razi
User avatar
shut.theart
Membru, skill +3
Membru, skill +3
Posts: 1230
Joined: 10 Aug 2012, 13:04
Detinator Steam: Da
Has thanked: 52 times
Been thanked: 20 times
Contact:

18 Apr 2013, 17:32

nu cred ca are legatura fiindca e pe levele!!

Post Reply

Return to “Probleme la servere dedicate de Counter-Strike”

  • Information
  • Who is online

    Users browsing this forum: Yandex [Bot] and 145 guests