[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:

09 Dec 2013, 17:11

Descriere: Daca un jucator atinge sau depaseste 100 fraguri acest plugin reseteaza tuturor jucatorilor scorul ! [ Un fel de RS ]

Descarcare:
Versiune 1.0 | Afiseaza codul
/* 100 Kills = Reset Score 	xD */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <ColorChat>

#define PLUGIN "100 Kills = Reset Score  xD"
#define VERSION "1.0"
#define AUTHOR "GhosT ***"


public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_logevent ("round_end", 2, "1=Round_End");
}

public round_end(id)
{
	if(get_user_frags(id) >= 100 && is_user_connected(id))
	{
		cs_set_user_deaths(0, 0)
		set_user_frags(0, 0)
		cs_set_user_deaths(0, 0)
		set_user_frags(0, 0)
		ColorChat(0, TEAM_COLOR, "--------------------------------------------------------")
		ColorChat(0, GREEN, "[RESET] Scorul tuturor jucatorilor a fost resetat !")
		ColorChat(0, GREEN, "[RESET] Deoarece unul dintre jucatori a atins 100 kills!")
		ColorChat(0, TEAM_COLOR, "--------------------------------------------------------")
	}
}
Versiunea 1.0
Versiunea 1.1 | Afiseaza codul
/* 100 Kills = Reset Score 	xD 

	Change Log
	
	Versiunea 1.0 - Lansarea [09.12.2013]
	Versiunea 1.1 - Rescrierea codului [10.12.2013]
	Atunci cand un player face cele 100 killuri ii va scrie si numele lui
	
	Credits
	
	GhosT *** - realizare							*/

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <ColorChat>

#define PLUGIN "100 Kills = Reset Score  xD"
#define VERSION "1.1"
#define AUTHOR "GhosT ***"


public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_logevent ("round_end", 2, "1=Round_End");
}

public round_end()
{
	new iplayers[32], inum;
	get_players(iplayers, inum)
   
	new id;
   
	for(new i = 0; i < inum; i++)
	{
		id = iplayers
		
		
		if(get_user_frags(id) >= 100 && is_user_connected(id))
		{
			new name[33];
			get_user_name(id, name, 31)
			cs_set_user_deaths(0, 0)
			set_user_frags(0, 0)
			ColorChat(0, TEAM_COLOR, "----------------------------------------------")
			ColorChat(0, GREEN, "[RESET] Scorul tuturor jucatorilor a fost resetat !")
			ColorChat(0, GREEN, "[RESET] Deoarece %s a atins 100 kills !", name)
			ColorChat(0, TEAM_COLOR, "----------------------------------------------")
		}
	}
}

Versiunea 1.2 | 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;
}

Versiunea lui cyby | Afiseaza codul
/* 100 Kills = Reset Score 	xD 

	Change Log
	
	Versiunea 1.0 - Lansarea [09.12.2013]
	Versiunea 1.1 - Rescrierea codului [10.12.2013]
	Atunci cand un player face cele 100 killuri ii va scrie si numele lui
	
	Credits
	
	GhosT *** - realizare							*/

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <ColorChat>

#define PLUGIN "100 Kills = Reset Score  xD"
#define VERSION "1.1"
#define AUTHOR "GhosT ***"

new exist_100kills;

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_logevent ("round_end", 2, "1=Round_End");
}

public round_end()
{
	new iplayers[32], inum;
	get_players(iplayers, inum)
   
	static id, name[32];
	exist_100kills = false
	for(new i = 0; i < inum; i++)
	{
		id = iplayers
		
		if(!is_user_connected(id))
			continue
	
		if(get_user_frags(id) >= 100)
		{
			get_user_name(id, name, charsmax(name) - 1)
			exist_100kills = true
		}
		
		if(exist_100kills)
		{
			ColorChat(id, TEAM_COLOR, "----------------------------------------------")
			ColorChat(id, GREEN, "[RESET] Scorul tuturor jucatorilor a fost resetat !")
			ColorChat(id, GREEN, "[RESET] Deoarece %s a atins 100 kills !", name)
			ColorChat(id, TEAM_COLOR, "----------------------------------------------")
			cs_set_user_deaths(id, 0)
			set_user_frags(id, 0)
		}
	}
}


Versiunea 1.1

Nume: 100 Kills = Reset Score
Versiune: 1.0
Autor: GhosT ***

Link oficial: Aici

Instalare:
1. Fisierul 100kills_reset.sma il puneti in addons/amxmodx/scripting
2. Fisierul 100kills_reset.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
Cod:
100kills_reset.amxx

Comenzi publice (se tasteaza in joc prin apasarea tastei Y): Nu are

Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg): Nu are

Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):
- CStrike
- Fun

Imagini: Nu am

P.S E netestat :-s
Last edited by GhosT *** on 26 Feb 2014, 17:28, edited 16 times in total.
User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2447
Joined: 10 May 2013, 13:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 255 times
Been thanked: 281 times
Contact:

09 Dec 2013, 18:16

GhosT *** wrote:Descriere: Daca un jucator atinge sau depaseste 100 fraguri acest plugin reseteaza tuturor jucatorilor scorul ! [ Un el de RS ]

Descarcare:
Sursa xD | Afiseaza codul
/* 100 Kills = Reset Score 	xD */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <ColorChat>

#define PLUGIN "100 Kills = Reset Score  xD"
#define VERSION "1.0"
#define AUTHOR "GhosT ***"


public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_logevent ("round_end", 2, "1=Round_End");
}

public round_end(id)
{
	if(get_user_frags(id) >= 100 && is_user_connected(id))
	{
		cs_set_user_deaths(0, 0)
		set_user_frags(0, 0)
		cs_set_user_deaths(0, 0)
		set_user_frags(0, 0)
		ColorChat(0, TEAM_COLOR, "--------------------------------------------------------")
		ColorChat(0, GREEN, "[RESET] Scorul tuturor jucatorilor a fost resetat !")
		ColorChat(0, GREEN, "[RESET] Deoarece unul dintre jucatori a atins 100 kills!")
		ColorChat(0, TEAM_COLOR, "--------------------------------------------------------")
	}
}
http://www.fileshare.ro/e30049349

Nume: 100 Kills = Reset Score
Versiune: 1.0
Autor: GhosT ***
Link oficial: Aici

Instalare:
1. Fisierul 100kills_reset.sma il puneti in addons/amxmodx/scripting
2. Fisierul 100kills_reset.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
Cod:
100kills_reset.amxx

4. Alti pasi necesari....

Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):
- CStrike
- Fun

Imagini: Nu am

P.S E netestat :-s
Oricine poate sa faca asa ceva ;) ! Faina ideea ! In sfarsit cineva care vine cu ceva original ! Bravo !
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș

discord: IonutC#5114

Vrei sa joci pe un server de biohazard clasic specific timpurilor 2008-2012?
CLICK | Afiseaza codul
89.44.246.14:27015 biohazard clasic
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:

09 Dec 2013, 18:30

Multumesc , l-am facut la o cerere care a fost mutata la cos :-q
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

10 Dec 2013, 11:07

1.
ghosT , in loc sa veirifici la sf rundei ai putea verifica chiar in timp ce face fragurul (ultimul)


- Foloseste hamsandwich si veirifica in eventul Ham_Killed

2. aici ai o greseala de ortografie :

Code: Select all

[ Un el de RS ]
:))


3. foloseste get_user_name ca sa afli numele jucatorului care a facut 100 de fraguri si scriel in mesaj :)

voi mai revenit cu mai multe sugestiii

PS: in ham_killed verifica daca attackatorul afacut 100 de killuri


4. Fa un cvar pentru alegerea numarului maxim de fraguri :)



5. ai putea ca atunci cand un jucator sa face nr maxim de fraguri sa schimbi mapa :D
munir
Membru eXtream
Membru eXtream
Posts: 3193
Joined: 30 Aug 2012, 21:16
Detinator Steam: Da
CS Status: Fost scripter
Detinator server CS: Nu
SteamID: -
Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff
Location: Bucuresti
Has thanked: 335 times
Been thanked: 570 times
Contact:

10 Dec 2013, 12:51

LordOfNothing wrote:1.
ghosT , in loc sa veirifici la sf rundei ai putea verifica chiar in timp ce face fragurul (ultimul)


- Foloseste hamsandwich si veirifica in eventul Ham_Killed

2. aici ai o greseala de ortografie :

Code: Select all

[ Un el de RS ]
:))


3. foloseste get_user_name ca sa afli numele jucatorului care a facut 100 de fraguri si scriel in mesaj :)

voi mai revenit cu mai multe sugestiii
PS: in ham_killed verifica daca attackatorul afacut 100 de killuri


4. Fa un cvar pentru alegerea numarului maxim de fraguri :)



5. ai putea ca atunci cand un jucator sa face nr maxim de fraguri sa schimbi mapa :D
Spui o gramada de prost.ii, mai mari decat tine. Exista eventul DeathMsg, care face cam acelasi lucru ca Ham_Killed.
@Ghost, la logevent se parcurg playerii cu un loop.

Code: Select all

public round_end()
	new iplayers[ 32 ], inum;
	get_players( iplayers, inum )
	
	new id;
	
	for( new i = 0; i < inum; i++ )
    {
		id = iplayers[ i ]
		
    	if(get_user_frags(id) >= 100 && is_user_connected(id))
    	{
    		cs_set_user_deaths(id, 0)
    		set_user_frags(id, 0)
    		cs_set_user_deaths(id, 0)
    		set_user_frags(id, 0)
    		ColorChat(0, TEAM_COLOR, "--------------------------------------------------------")
    		ColorChat(0, GREEN, "[RESET] Scorul tuturor jucatorilor a fost resetat !")
    		ColorChat(0, GREEN, "[RESET] Deoarece unul dintre jucatori a atins 100 kills!")
    		ColorChat(0, TEAM_COLOR, "--------------------------------------------------------")
    	}
    }
@Btw, editeaza dupa modelul de postare.

Code: Select all

. ai putea ca atunci cand un jucator sa face nr maxim de fraguri sa schimbi mapa
Asta ar insemna sa fie gun - game.
Retras
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:

10 Dec 2013, 13:44

LordOfNothing wrote:1.
ghosT , in loc sa veirifici la sf rundei ai putea verifica chiar in timp ce face fragurul (ultimul)


- Foloseste hamsandwich si veirifica in eventul Ham_Killed

2. aici ai o greseala de ortografie :

Code: Select all

[ Un el de RS ]
:))


3. foloseste get_user_name ca sa afli numele jucatorului care a facut 100 de fraguri si scriel in mesaj :)

voi mai revenit cu mai multe sugestiii

PS: in ham_killed verifica daca attackatorul afacut 100 de killuri


4. Fa un cvar pentru alegerea numarului maxim de fraguri :)



5. ai putea ca atunci cand un jucator sa face nr maxim de fraguri sa schimbi mapa :D
EDIT: cvarul il voi pune in versiunea 1.2

Chestia cu mapa .. E cam GG( Gun Game) xD
Las la final pentru ca ar fi cam nasol dupa parerea mea sa dea reset in timpul rundei :D
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

15 Dec 2013, 13:01

Nu e bine .. uite aici un exemplu ghost : (netestat)

| Afiseaza codul
//	Includes !	//

#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fun>
#include <colorchat>

//	Plugin Info	//

new const PLUGIN [] = "Max Kills !";
new const VERSION [] = "1.2";
new const AUTHOR [] = "GhosT ***";

//	Global Variables:	//

new maxkills;
new enable;

//	Plugin Init !	//

public plugin_init()
{
		register_plugin(PLUGIN,VERSION,AUTHOR);
		
		RegisterHam(Ham_Killed, "player", "HookPlayerAction", 1);
		
		maxkills = register_cvar("amx_maxkills","100");
		enable = register_cvar("amx_enable_maxkills","1");
}

//	Start coding	//

public HookPlayerAction(victim,attacker,shouldgib)
{
		if(!get_pcvar_num(enable))
			return;
			
		if(get_user_frags(attacker) >= get_pcvar_num(maxkills))
		{
		
				new name[35];
				get_user_name(attacker, name, 34);

				ResetScore();

				ColorChat(0, TEAM_COLOR, "----------------------------------------------")
				ColorChat(0, GREEN, "[RESET] Scorul tuturor jucatorilor a fost resetat !")
				ColorChat(0, GREEN, "[RESET] Deoarece %s a atins 100 kills !", name)
				ColorChat(0, TEAM_COLOR, "----------------------------------------------")
		}
}

//	A little function	//

public ResetScore()
{
		new Players[32] 
		new playerCount, i, player 
		get_players(Players, playerCount, "b") 
		for (i=0; i<playerCount; i++) 
			player = Players 

		set_user_frags(player, 0);
		cs_set_user_deaths(player, 0);
		set_user_frags(player, 0);
		cs_set_user_deaths(player, 0);
}
User avatar
shut.theart
Membru, skill +3
Membru, skill +3
Posts: 1220
Joined: 10 Aug 2012, 12:04
Detinator Steam: Da
Has thanked: 52 times
Been thanked: 20 times
Contact:

17 Dec 2013, 19:29

YONTU wrote:
GhosT *** wrote:Descriere: Daca un jucator atinge sau depaseste 100 fraguri acest plugin reseteaza tuturor jucatorilor scorul ! [ Un el de RS ]

Descarcare:
Sursa xD | Afiseaza codul
/* 100 Kills = Reset Score 	xD */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <ColorChat>

#define PLUGIN "100 Kills = Reset Score  xD"
#define VERSION "1.0"
#define AUTHOR "GhosT ***"


public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_logevent ("round_end", 2, "1=Round_End");
}

public round_end(id)
{
	if(get_user_frags(id) >= 100 && is_user_connected(id))
	{
		cs_set_user_deaths(0, 0)
		set_user_frags(0, 0)
		cs_set_user_deaths(0, 0)
		set_user_frags(0, 0)
		ColorChat(0, TEAM_COLOR, "--------------------------------------------------------")
		ColorChat(0, GREEN, "[RESET] Scorul tuturor jucatorilor a fost resetat !")
		ColorChat(0, GREEN, "[RESET] Deoarece unul dintre jucatori a atins 100 kills!")
		ColorChat(0, TEAM_COLOR, "--------------------------------------------------------")
	}
}
http://www.fileshare.ro/e30049349

Nume: 100 Kills = Reset Score
Versiune: 1.0
Autor: GhosT ***
Link oficial: Aici

Instalare:
1. Fisierul 100kills_reset.sma il puneti in addons/amxmodx/scripting
2. Fisierul 100kills_reset.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
Cod:
100kills_reset.amxx

4. Alti pasi necesari....

Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):
- CStrike
- Fun

Imagini: Nu am

P.S E netestat :-s
Oricine poate sa faca asa ceva ;) ! Faina ideea ! In sfarsit cineva care vine cu ceva original ! Bravo !

Nu inteleg? Te dai mare ca stii 2-3 chestii amxx?
Ei bine eu nu stiu sa-l fac! Deci nu oricine!

munir
Membru eXtream
Membru eXtream
Posts: 3193
Joined: 30 Aug 2012, 21:16
Detinator Steam: Da
CS Status: Fost scripter
Detinator server CS: Nu
SteamID: -
Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff
Location: Bucuresti
Has thanked: 335 times
Been thanked: 570 times
Contact:

17 Dec 2013, 20:56

LordOfNothing wrote:Nu e bine .. uite aici un exemplu ghost : (netestat)

| Afiseaza codul
//	Includes !	//

#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fun>
#include <colorchat>

//	Plugin Info	//

new const PLUGIN [] = "Max Kills !";
new const VERSION [] = "1.2";
new const AUTHOR [] = "GhosT ***";

//	Global Variables:	//

new maxkills;
new enable;

//	Plugin Init !	//

public plugin_init()
{
		register_plugin(PLUGIN,VERSION,AUTHOR);
		
		RegisterHam(Ham_Killed, "player", "HookPlayerAction", 1);
		
		maxkills = register_cvar("amx_maxkills","100");
		enable = register_cvar("amx_enable_maxkills","1");
}

//	Start coding	//

public HookPlayerAction(victim,attacker,shouldgib)
{
		if(!get_pcvar_num(enable))
			return;
			
		if(get_user_frags(attacker) >= get_pcvar_num(maxkills))
		{
		
				new name[35];
				get_user_name(attacker, name, 34);

				ResetScore();

				ColorChat(0, TEAM_COLOR, "----------------------------------------------")
				ColorChat(0, GREEN, "[RESET] Scorul tuturor jucatorilor a fost resetat !")
				ColorChat(0, GREEN, "[RESET] Deoarece %s a atins 100 kills !", name)
				ColorChat(0, TEAM_COLOR, "----------------------------------------------")
		}
}

//	A little function	//

public ResetScore()
{
		new Players[32] 
		new playerCount, i, player 
		get_players(Players, playerCount, "b") 
		for (i=0; i<playerCount; i++) 
			player = Players 

		set_user_frags(player, 0);
		cs_set_user_deaths(player, 0);
		set_user_frags(player, 0);
		cs_set_user_deaths(player, 0);
}

Pentru ce sa incluzi un modul daca il folosesti doar odata? Si poti face ceva mai simplu, cu un event, ceea ce ai facut tu cu un modul.
Retras
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

18 Dec 2013, 08:53

ok , deci Ghost inlocuieste Ham_killed cu DeathMsg
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:

18 Dec 2013, 12:48

Il voi face cand voi avea timp ca sunt ocupat ..
User avatar
Deevix
Membru, skill +1
Membru, skill +1
Posts: 191
Joined: 10 Aug 2013, 22:17
Detinator Steam: Nu
CS Status: Zombie
Location: Summoner's Rift
Has thanked: 14 times
Been thanked: 5 times
Contact:

18 Dec 2013, 13:16

O propunere , la 100 kill-uri sa se reseteze scorul si sa primesti alt skin. Ar fi mai fun ;)
Image

ZOMBIE MOD3 LIKE BETA V1.0 (BASED ON ZP) (89%) [PRIVAT]
Post Reply

Return to “Pluginuri eXtream”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests