Problema plugin

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
Killer*Elite
Membru, skill 0
Membru, skill 0
Posts: 36
Joined: 28 Jul 2010, 00:53
Detinator Steam: Da
Detinator server CS: da
Location: ROMANIA
Has thanked: 1 time
Been thanked: 2 times
Contact:

20 Aug 2010, 14:54

Ce am gresit la acest plugin cand l-am editat eu vrea cand castige terro sa apara imaginea win terro si asa la counter acest plugin este de fapt zp_new_win_msg_1.3.sma am editat si imaginile la zombi win sa fie terro win asa si la counter

uitati sma

Code: Select all

/*
	[ZP] New Win Messages

	Plugin by Shidla [SGC] & xPaw & 93()|29!/<
	
	Idea & models:
	Koshak		| ICQ: 283-361-228	(zombie-mod.ru)

	Credits:
	xPaw									(Main code... My was worse... But it worked too :))
	93()|29!/<	| SkyPE: georgik_braila 	(Bug fixing)
				| Yahoo Messenger: george_stafie
	MeRcyLeZZ								(For his Zombie Plague)
	CHyCMyMpNk	| ICQ: 4-888-617			(forum.hlds.us)
	Fedcomp		| ICQ: 536020				(gm-community.net / forum.hlds.us / amx-x.ru / gscom.org)
	PomanoB		| ICQ: 147-919				(gm-community.net / forum.hlds.us / amx-x.ru)
	DJ_WEST		| ICQ: 634-866 				(For his amx-x.ru & reallite.cs2.ru)
	meTaLiCroSS								(For something, what ever... I know him - we steal something: his idea\code\constant\crap\brain\blablabla :))



	Shidla [SGC] | 2010 | ICQ: 312-298-513
	
	1.3 [Final Version]

	http://forums.alliedmods.net/showthread.php?t=128385		// Eng
	http://forum.hlds.us/showthread.php?p=84425					// Rus
*/

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

new Hands[33], MaxPlayers

new const MODELS[3][] =
{
	"",
	"models/player/guerilla_win.mdl",
	"models/player/gsg9_win.mdl"
};

new const MODELS_FLIP[3][] =
{
	"",
	"models/zombie_plague/guerilla_win-f.mdl",
	"models/zombie_plague/gsg9_win-f.mdl"
};


new g_iModelIndex[3], g_iWinTeam, g_iModelIndexFlip[3];

public plugin_init()
{
	register_plugin("[ZP] Sub-Plugin: New Win Messages", "1.3", "Shidla, xPaw, 93()|29!/<" );
	register_event("HLTV", "EventRoundStart", "a", "1=0", "2=0" );
	register_event("CurWeapon", "EventCurWeapon", "be", "1=1");

	MaxPlayers = get_maxplayers();

	register_cvar("Shidla", "[ZP] New Win Messages v.1.3", FCVAR_SERVER|FCVAR_SPONLY);
	register_cvar("zp_new_win_messages", "[ZP] New Win Messages v.1.3", FCVAR_SERVER|FCVAR_SPONLY);
}

public plugin_precache()
{
	for (new i = WIN_GUERILLA; i <= WIN_GSG9; i++)
	{
		precache_model(MODELS[i]);
		g_iModelIndex[i] = engfunc(EngFunc_AllocString, MODELS[i]);
		precache_model(MODELS_FLIP[i]);
		g_iModelIndexFlip[i] = engfunc(EngFunc_AllocString, MODELS_FLIP[i]);
	}
}

public client_connect(id)
{
	if(!is_user_bot(id))
		query_client_cvar(id , "cl_righthand" , "Hands_CVAR_Value");
}

public Hands_CVAR_Value(id, const cvar[], const value[])
{
	if(1 <= id <= MaxPlayers)	// Bug Fix
		Hands[id] = str_to_num(value)
}

public client_disconnect(id)
{
	Hands[id] = 0
}

public zp_round_ended(iTeam)
{
	if (iTeam == WIN_NO_ONE)
		return;
	g_iWinTeam = iTeam;
	new iPlayers[32], iNum;
	get_players(iPlayers, iNum, "ch");
	for (new i; i < iNum; i++)
	{
		client_cmd(iPlayers[i], "cl_righthand ^"1^"");
		zp_set_user_nightvision(iPlayers[i], 1);

		if (get_user_weapon(iPlayers[i]) != CSW_KNIFE)
			set_pev(iPlayers[i], pev_viewmodel, g_iModelIndexFlip[iTeam]);
		else
			set_pev(iPlayers[i], pev_viewmodel, g_iModelIndex[iTeam]);
	}
}

public EventRoundStart()
{
	g_iWinTeam = WIN_NO_ONE;

	for (new i = 1; i <= MaxPlayers; i++)
	{
		if(!is_user_connected(i))
			continue;		// xPaw fix)))

		client_cmd(i, "cl_righthand ^"%d^"", Hands[i]);
		//client_print(i,print_chat,"[DEBUG] Значение данных '%d'***", Hands[i]);
	}
}

public EventCurWeapon(const id)
{
	if (g_iWinTeam > WIN_NO_ONE)
	{
		client_cmd(id, "cl_righthand ^"1^"");

		if (get_user_weapon(id) != CSW_KNIFE)
			set_pev(id, pev_viewmodel, g_iModelIndexFlip[g_iWinTeam]);
		else
			set_pev(id, pev_viewmodel, g_iModelIndex[g_iWinTeam]);
	}
}

// Yes, baby, its's Russia! xDD
// Thanks for all, who help me)))
Se dau STEAM GRATISE!
Apasa pe imaginea din dreapta
Image
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 23 guests