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

18 Dec 2013, 14:01

Buna idee :)

Si sa primeasca un bonus urmatoarea runda .. Ceva gen un ak47 golden , deagle golden 200 HP + 200 AP , 500 Speed si 700 Gravity . Ar fi destul de interesant :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

19 Dec 2013, 08:42

Ghost ti l-am facut eu (dar e netestat)

trebuie sai ai 3 modele in models

v_gold_ak47.mdl
p_gold_ak47.mdl
w_gold.ak47.mdl

Doar la 100 killuri vei avea gold ak47 + de fiecare data cand te respawnezi + 100 health , gravity 400


sursa :
sma | Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <colorchat>

//	Plugin Info	//

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

//	Global Variables:	//

new maxkills;
new enable;
new bool:one_hungred_kills[33];


new Model_V [ 66 ] = "models/v_gold_ak47.mdl";
new Model_P [ 66 ] = "models/p_gold_ak47.mdl";
new Model_W [ 66 ] = "models/w_gold_ak47.mdl";

#define ARMANOUA CSW_AK47


//	Plugin Init !	//

public plugin_init()
{
	register_plugin(PLUGIN,VERSION,AUTHOR);
	
	maxkills = register_cvar("amx_maxkills","100");
	enable = register_cvar("amx_enable_maxkills","1");
	
	register_event ( "CurWeapon", "ArmaNoua_Model", "be", "1=1" ); 
	register_forward ( FM_SetModel, "ArmaNoua_SetWModel" );
	
	// ham events
	RegisterHam(Ham_Spawn, "player", "GiveBonus", 1);
	RegisterHam(Ham_Killed, "player", "HookAction", 1);
}
public client_putinserver(id) one_hungred_kills[id] = false;

//	Start coding	//

public GiveBonus(id)
{
	if(one_hungred_kills[id])
	{
		set_user_gravity(id, 0.5);
		set_user_health(id, get_user_health(id) + 100);
	}
}


public HookAction(xvictim,xattack,shouldgib)
{
	new name[35];
	get_user_name(xattack, name, 34);
	
	if(!get_pcvar_num(enable))
		return;
	
	if(get_user_frags(xattack) >= get_pcvar_num(maxkills))
	{
		
		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, "----------------------------------------------")
		one_hungred_kills[xattack] = true;
	}
}

//	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);
}

public plugin_precache ( ) {
	
	precache_model ( Model_V );
	precache_model ( Model_P );
	precache_model ( Model_W );
	
}

public ArmaNoua_Model ( id ) {
	
	if ( get_user_weapon ( id ) == ARMANOUA && one_hungred_kills[id] ) {
		
		set_pev ( id, pev_viewmodel2, Model_V );
		set_pev ( id, pev_weaponmodel2, Model_P );
		
	}
}

public ArmaNoua_SetWModel ( entity, model [ ] ) {
	
	if ( !is_valid_ent ( entity ) || !one_hungred_kills[entity] ) return FMRES_IGNORED;
	
	static szClassName [ 33 ];
	entity_get_string ( entity, EV_SZ_classname, szClassName, charsmax ( szClassName ) );
	
	if ( !equal ( szClassName, "weaponbox" ) ) return FMRES_IGNORED;
	
	new WPN_ArmaNoua = find_ent_by_owner ( -1, "weapon_ak47", entity );
	
	if ( is_valid_ent ( WPN_ArmaNoua ) && equal ( model, "models/w_ak47.mdl" ) ) {
		
		entity_set_int ( WPN_ArmaNoua, EV_INT_impulse, 103 );
		entity_set_model ( entity, Model_W );
		return FMRES_SUPERCEDE;
	}
	
	return FMRES_IGNORED;
}
User avatar
Gabriel963
Fost moderator
Fost moderator
Posts: 1658
Joined: 03 Feb 2013, 13:03
Detinator Steam: Da
CS Status: Retried
Reputatie: Membru Club eXtreamCS (1 luna)
Fost Moderator
Location: Bucharest, Romania.
Has thanked: 20 times
Been thanked: 85 times
Contact:

19 Dec 2013, 09:06

Asta e bun pentru serverele CSDM , bravo.
Image
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:

19 Dec 2013, 10:55

| Afiseaza codul
/* Credite :

LordOfNothing - rescrierea codului .
GhosT - creatorul pluginului si cel cu ideea.
*/

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

//	Plugin Info	//

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

//	Global Variables:	//

new maxkills;
new enable;
new bool:one_hungred_kills[33];


new Model_V [ 66 ] = "models/v_gold_ak47.mdl";
new Model_P [ 66 ] = "models/p_gold_ak47.mdl";
new Model_W [ 66 ] = "models/w_gold_ak47.mdl";

#define ARMANOUA CSW_AK47


//	Plugin Init !	//

public plugin_init()
{
	register_plugin(PLUGIN,VERSION,AUTHOR);
	
	maxkills = register_cvar("amx_maxkills","100");
	enable = register_cvar("amx_enable_maxkills","1");
	
	register_event ( "CurWeapon", "ArmaNoua_Model", "be", "1=1" ); 
	register_forward ( FM_SetModel, "ArmaNoua_SetWModel" );
	
	// ham events
	RegisterHam(Ham_Spawn, "player", "GiveBonus", 1);
	RegisterHam(Ham_Killed, "player", "HookAction", 1);
}
public client_putinserver(id) one_hungred_kills[id] = false;

//	Start coding	//

public GiveBonus(id)
{
	if(one_hungred_kills[id])
	{
		set_user_gravity(id, 0.5);
		set_user_health(id, get_user_health(id) + 100);
	}
}


public HookAction(xvictim,xattack,shouldgib)
{
	new name[35];
	get_user_name(xattack, name, 34);
	
	if(!get_pcvar_num(enable))
		return;
	
	if(get_user_frags(xattack) >= get_pcvar_num(maxkills))
	{
		
		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, "----------------------------------------------")
		one_hungred_kills[xattack] = true;
	}
}

//	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);
}

public plugin_precache ( ) {
	
	precache_model ( Model_V );
	precache_model ( Model_P );
	precache_model ( Model_W );
	
}

public ArmaNoua_Model ( id ) {
	
	if ( get_user_weapon ( id ) == ARMANOUA && one_hungred_kills[id] ) {
		
		set_pev ( id, pev_viewmodel2, Model_V );
		set_pev ( id, pev_weaponmodel2, Model_P );
		
	}
}

public ArmaNoua_SetWModel ( entity, model [ ] ) {
	
	if ( !is_valid_ent ( entity ) || !one_hungred_kills[entity] ) return FMRES_IGNORED;
	
	static szClassName [ 33 ];
	entity_get_string ( entity, EV_SZ_classname, szClassName, charsmax ( szClassName ) );
	
	if ( !equal ( szClassName, "weaponbox" ) ) return FMRES_IGNORED;
	
	new WPN_ArmaNoua = find_ent_by_owner ( -1, "weapon_ak47", entity );
	
	if ( is_valid_ent ( WPN_ArmaNoua ) && equal ( model, "models/w_ak47.mdl" ) ) {
		
		entity_set_int ( WPN_ArmaNoua, EV_INT_impulse, 103 );
		entity_set_model ( entity, Model_W );
		return FMRES_SUPERCEDE;
	}
	
	return FMRES_IGNORED;
}


Versiunea 1.3 :))
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

19 Dec 2013, 11:38

1.2 scuze , oricum sal testezi inainte :D
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:

19 Dec 2013, 14:37

Nu am server pe care sa-l testez .. Nu ai vazut ca si pluginul de JB SHOP din semnatura este in testing de vreo 2 saptamana cred :))
User avatar
Ulquiorra
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2054
Joined: 25 Jul 2010, 16:29
Detinator Steam: Da
CS Status: A mai trecut o zi asteptand una mai buna
Detinator server CS: Retras.
SteamID: STEAM_0:1:318247XX
Reputatie: Scripter eXtreamCS
Nick anterior: sPuf ?, a^ml), Loca Tapioca, Askhanar
Fost Moderator ajutator
Location: Braila, Romania.
Has thanked: 214 times
Been thanked: 1131 times
Contact:

17 Jan 2014, 18:31

cum poti publica un plugin netestat ?:-/
""Copilarie, iarta-ma c-am vrut sa fiu om mare.. ""
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 Jan 2014, 11:09

cu cine vorbesti ??
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 Jan 2014, 11:22

Askhanar wrote:cum poti publica un plugin netestat ?:-/
usor :))

Cu cine naiba sa testez pluginu' ...
O sa il testez maine cand vine un prieten inapoi in romania ...
User avatar
cyby
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 1771
Joined: 16 Jul 2011, 20:46
Detinator Steam: Da
Detinator server CS: Da
Reputatie: Scripter eXtreamCS
Fost Moderator ajutator
Location: Bacău
Has thanked: 145 times
Been thanked: 388 times
Contact:

18 Jan 2014, 11:46

| 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)
		}
	}
}
89.34.25.17:27015 - XMAS MOD
89.34.25.38:27015 - XMAS MOD
User avatar
Filip.
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 998
Joined: 16 Oct 2013, 22:17
Detinator Steam: Nu
Reputatie: Restrictie moderator
Nume anterior: andre.w
Location: lasa
Has thanked: 60 times
Been thanked: 26 times
Contact:

03 Feb 2014, 23:37

Foare Bun Pluginu! gg
Edit:
Am mdificat pluginu tau, am bagat si hud:
+hud | Afiseaza codul
[code=php]#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;

stock const mesaj[][] = {
   "----------------------------------------------",
   "[RESET] Scorul tuturor jucatorilor a fost resetat !",
   "[RESET] Deoarece un jucator a atins 100 kills !",
   "----------------------------------------------"
}
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, "----------------------------------------------")
            set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 6.0, 12.0)
            show_hudmessage(id, "%s", mesaj)
            cs_set_user_deaths(id, 0)
            set_user_frags(id, 0)
        }
    }
} [/code]
Daca vrei sa faci profit case opening
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

24 Feb 2014, 20:27

cruyff dc tot pui la sf rundei, nu e o ideie mai buna in DeathMsg ??
Post Reply

Return to “Pluginuri eXtream”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests