[Plugin] 100 Kills = Reset Score

Pluginuri facute de utilizatorii forumului eXtream.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

User avatar
GhosT ***
Membru, skill +2
Membru, skill +2
Posts: 604
Joined: 04 Dec 2013, 21:52
Detinator Steam: Da
CS Status: Morphin . [ Retras ]
SteamID: Mutulica1428
Reputatie: Fost Moderator ajutator
Location: Dumesti.
Has thanked: 40 times
Been thanked: 99 times
Contact:

25 Feb 2014, 15:46

LordOfNothing wrote:cruyff dc tot pui la sf rundei, nu e o ideie mai buna in DeathMsg ??
Asta ar insemna "GG" ..
Rapidserver
LordOfNothing
Membru, skill +1
Membru, skill +1
Posts: 387
Joined: 19 Jul 2013, 14:51
Detinator Steam: Nu
Reputatie: Restrictie PM
Has thanked: 11 times
Been thanked: 34 times

25 Feb 2014, 20:45

GhosT *** wrote:
LordOfNothing wrote:cruyff dc tot pui la sf rundei, nu e o ideie mai buna in DeathMsg ??
Asta ar insemna "GG" ..
nu mai zi cuvinte la intimplare si incearca sa "gandesti" , cruyff se referea cai "gg" daca punem sa se reseteze mapa, DeathMsg e o optimizare a codului pentru a fi mai rapid
User avatar
GhosT ***
Membru, skill +2
Membru, skill +2
Posts: 604
Joined: 04 Dec 2013, 21:52
Detinator Steam: Da
CS Status: Morphin . [ Retras ]
SteamID: Mutulica1428
Reputatie: Fost Moderator ajutator
Location: Dumesti.
Has thanked: 40 times
Been thanked: 99 times
Contact:

26 Feb 2014, 17:30

LordOfNothing wrote:
GhosT *** wrote:
LordOfNothing wrote:cruyff dc tot pui la sf rundei, nu e o ideie mai buna in DeathMsg ??
Asta ar insemna "GG" ..
nu mai zi cuvinte la intimplare si incearca sa "gandesti" , cruyff se referea cai "gg" daca punem sa se reseteze mapa, DeathMsg e o optimizare a codului pentru a fi mai rapid
Iti convine ?
| Afiseaza codul
#include <amxmodx>
#include <colorchat>

#pragma semicolon 1

native set_user_frags(id=0, cantitate=0);
native cs_set_user_deaths(id=0, cantitate=0);

new CvarMaxKills;
new iMaxKills;

public plugin_cfg()
	iMaxKills = get_pcvar_num(CvarMaxKills);

//=========================================================================	

public plugin_init()
{
	new const
		PLUGIN_NAME[] = "100 kills = rs",
		PLUGIN_VERS[] = "1.2",
		PLUGIN_AUTH[] = "GhosT ***";
	
	register_plugin(PLUGIN_NAME, PLUGIN_VERS, PLUGIN_AUTH);
	
	register_event("DeathMsg", "DeathMsg", "a");
	
	CvarMaxKills = register_cvar("MaxKillsReset", "1");
}
public DeathMsg()
{
	new iAttacker = read_data(1);
	
	if(get_user_frags(iAttacker) >= iMaxKills && iMaxKills >= 1)
	{
		new iAttackerName[32];
		get_user_name(iAttacker, iAttackerName, sizeof(iAttackerName) - 1);
		
		set_user_frags(0, 0);
		cs_set_user_deaths(0, 0);
		
		ColorChat(0, RED, "----------------------------------------------");
		ColorChat(0, BLUE, "^x04[RESET]^x03 Scorul tuturor jucatorilor a fost resetat !");
		ColorChat(0, BLUE, "^x04[RESET]^x03 Deoarece %s a atins 100 fraguri !", iAttackerName);
		ColorChat(0, RED, "----------------------------------------------");
	}
	
	return PLUGIN_CONTINUE;
}
sUperstar # talenT
Membru, skill 0
Membru, skill 0
Posts: 43
Joined: 22 Oct 2009, 13:39
Detinator Steam: Da
CS Status: csdm.csblackdevil.com
Detinator server CS: csdm.csblackdevil.co
SteamID: duffy918
Location: Tg-Jiu
Has thanked: 8 times
Contact:

04 Mar 2014, 11:16

Ce pot modifica ca la un anumit numar de fraguri .. sa se schimbe mapa automat cu cea din mapcycle
Image
User avatar
aEEk.#
Membru, skill 0
Membru, skill 0
Posts: 49
Joined: 13 Sep 2012, 21:06
Detinator Steam: Da
CS Status: Open your mind.
SteamID: ale_alexa2389
Location: VSTS
Has thanked: 6 times
Been thanked: 3 times
Contact:

25 Nov 2014, 20:41

Frumos, dar si mai frumos era daca setai un cvar gen amx_restart_mode 0/1/2 cu 0 dezactivat, 1 - activat pentru 1 singur jucator, 2 - activat pentru toata echipa

Vreau sa spun pentru 1 puteai sa pui o limita de x killuri, iar pentru 2 o limita de y killuri (2000 killuri) care sa fie luata pe toata echipa.
weez
Membru, skill 0
Membru, skill 0
Posts: 97
Joined: 16 Apr 2013, 18:36
Detinator Steam: Da
CS Status: MAPPER CS 1.6
Has thanked: 1 time
Been thanked: 5 times
Contact:

10 Oct 2015, 16:47

Nu merge .
User avatar
DaNNe.
Fost moderator
Fost moderator
Posts: 2808
Joined: 08 Nov 2013, 20:43
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 230 times
Been thanked: 128 times
Contact:

03 Nov 2015, 19:15

weez wrote:Nu merge .
Acum merge?
SMA | Afiseaza codul
#include 		<amxmodx>
#include 		<cstrike>
#include 		<fun>

#define 		PLUGIN		"Auto Reset Score"
#define 		VERSION		"2.0"
#define 		AUTHOR 		"GhosT ***" // Ma rog, doar ideea e de la el, dar sa nu zica ca e copiat, ca nu-i mare lucru.

new PlayerKills[33], cvar_autoreset, cvar_maxkills;

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	cvar_autoreset 		=		register_cvar("auto_reset_mode", "1") // 1 - Reseteaza doar celui care atinge limita | 2 - Reseteaza tuturor atunci cand cineva atinge limita
	cvar_maxkills		=		register_cvar("auto_reset_kills", "30") // La cate kill-uri se reseteaza scorul
	
	if(get_pcvar_num(cvar_autoreset))
		register_event("DeathMsg",	"EVENT_Death", "a")
}

public EVENT_Death() {
	if(get_pcvar_num(cvar_autoreset)) {
		new Attacker	=		read_data(1),
			Victim		=		read_data(2);
		if(is_user_connected(Attacker) && is_user_connected(Victim) && Attacker != Victim) {
			PlayerKills[Attacker]++
			new Name[32]
			get_user_name(Attacker, Name, 31)
			if(PlayerKills[Attacker] >= get_pcvar_num(cvar_maxkills)) {
				switch(get_pcvar_num(cvar_autoreset)) {
					case 1: { 
						ColorChat(0, "!g%s!t a ajuns la!g %d!t frag-uri, scorul tuturor a fost resetat.", Name, get_pcvar_num(cvar_maxkills))
						cs_set_user_deaths(0, 0)
						set_user_frags(0, 0)
					}
					case 2: {
						ColorChat(0, "!g%s!t a ajuns la!g %d!t frag-uri, scorul acestuia a fost resetat.", Name, get_pcvar_num(cvar_maxkills))
						cs_set_user_deaths(Attacker, 0)
						set_user_frags(Attacker, 0)	
					}
				}
			}
		}
	}
}
					
stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!g", "^4");
	replace_all(msg, 190, "!y", "^1");
	replace_all(msg, 190, "!t", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	} 
}
Contact: Activitate scazuta.
Post Reply

Return to “Pluginuri eXtream”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests