[Rezolvat] Show Credits

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 .
User avatar
Adventx
Membru, skill +4
Membru, skill +4
Posts: 1785
Joined: 17 Sep 2013, 20:44
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 125 times
Been thanked: 142 times
Contact:

03 Feb 2014, 18:06

Nu a lui Aragon, este un plugin Kill for Bonus, dar nu-l mai gasesc !
Zonek
User avatar
Chris Duskblade
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 2785
Joined: 18 Jun 2013, 15:46
Detinator Steam: Da
Reputatie: Fost super moderator
Nume anterior: Cristinel.
Utilizator neserios (tepar)
Location: Timișoara
Has thanked: 62 times
Been thanked: 15 times
Contact:

03 Feb 2014, 19:02

Poate poti face ceva din asta al lui aragon ? pentru orice ocazie il pun aici ..
Aragon Sistem Kill | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define VERSION	"2.1"

native get_user_credits(id)
native set_user_credits(id, cantitate)

public plugin_init()
{
	register_plugin("Kill Credite",VERSION,"Gabriel")

	register_event("DeathMsg","death_msg","a")

}

public death_msg()
{
	new iKiller = read_data ( 1 );
	new iVictim = read_data ( 2 );
	
	if ( iKiller == iVictim ) return 1;
	
	set_user_credits ( iKiller, get_user_credits ( iKiller ) + 7 );
	
	return 1;
}
Daca poate cineva , sa il transforme sa deie credite la pluginul lui ashkanar . aveti THX !

@EDIT : acest plugin merge , doar ca e de la aragon .. testat de mine !
Cosmin
Fost moderator
Fost moderator
Posts: 9361
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

03 Feb 2014, 19:05

| Afiseaza codul
#include <amxmodx>

new const PLUGIN[] = "Furien: Show User Datails"
new const VERSION[] = "1.0"

//Native
native fcs_get_user_credits(id);
native fcs_set_user_credits(id, cantitate);

public plugin_init()
{
   register_plugin(PLUGIN, VERSION, "Adventx")
   register_event( "DeathMsg", "event_deathmsg", "a" )
}

public client_putinserver(id)
{
   set_task(1.0, "ShowUserDetails", id,_,_,"b")
}
public ShowUserDetails(id)
{
   if(is_user_alive(id))
   {
      set_hudmessage(0, 255, 255, 0.01, 0.90, 0, 6.0, 3600.0)
      show_hudmessage(id, "HP: %d | Armor: %d | Credits: %d", get_user_health(id), get_user_armor(id),fcs_get_user_credits(id))
   }
   
   else
   {
      set_hudmessage(0, 255, 255, 0.01, 0.86, 0, 6.0, 3600.0)
      show_hudmessage(id, "HP: %d | Armor: %d | Credits: %d", get_user_health(id), get_user_armor(id),fcs_get_user_credits(id))
   }
}
public client_disconnect(id)
{
   remove_task(id);
}
public event_deathmsg( )
{
   new iKiller = read_data(1)
   new iVictim = read_data(2)
   if(iKiller != iVictim && is_user_alive(iKiller))
      fcs_set_user_credits(iKiller,fcs_get_user_credits(iKiller) + 7);
}
sau daca il vrei separat,fara huduri poftim(ai si cvar)
| Afiseaza codul
#include < amxmodx >

static const
	PLUGIN[] = "Credite Pe kill",
	VERSION[] = "1.1",
	AUTHOR[] = "C0sm1N";

native fcs_get_user_credits(id);
native fcs_set_user_credits(id, cantitate);

new cantitate_credite;
public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR);
	register_event("DeathMsg","ev_deathmsg","a");
	cantitate_credite = register_cvar("cvar_givecredits","7")
}
public ev_deathmsg( )
{
   new iKiller = read_data(1)
   new iVictim = read_data(2)
   if(iKiller != iVictim && is_user_alive(iKiller))
      fcs_set_user_credits(iKiller,fcs_get_user_credits(iKiller) + get_pcvar_num(cantitate_credite));
}
User avatar
Chris Duskblade
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 2785
Joined: 18 Jun 2013, 15:46
Detinator Steam: Da
Reputatie: Fost super moderator
Nume anterior: Cristinel.
Utilizator neserios (tepar)
Location: Timișoara
Has thanked: 62 times
Been thanked: 15 times
Contact:

03 Feb 2014, 19:25

Cosmynn , vad ca merge compilat , revin cu edit daca merge.
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:

03 Feb 2014, 20:31

L-am facut si eu .. Asta da credite si pe Hs si pe kill cu he / knife si normal .. Da si la bmb plant / explode / defuse .
| Afiseaza codul
#include <amxmodx>
#include <csx>

new const
	PLUGIN_NAME[]  =  "Kill Bonus Credits 'Askhanar System'",
	PLUGIN_VERSION[]  =  "1.0",
	PLUGIN_AUTHOR[]  =  "GhosT ***";
	
// pcvars

new HeadShot_Bonus, KillBonus, KnifeKillBonus, HeGrenadeBonus;
new BombPlant_Bonus, BombExplode_Bonus, BombDefuse_Bonus;

public plugin_init()
{
	register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
	
	register_event("DeathMsg", "DeathMsg", "a");
	
	// Cvars
	
	HeadShot_Bonus = register_cvar("HeadShot_Bonus", "5");
	KillBonus = register_cvar("KillBonus", "3");
	KnifeKillBonus = register_cvar("KnifeKillBonus", "6");
	HeGrenadeBonus = register_cvar("HeGrenadeBonus", "7");
	
	BombPlant_Bonus = register_cvar("BombPlant_Bonus", "5");
	BombExplode_Bonus = register_cvar("BombExplode_Bonus", "5");
	BombDefuse_Bonus = register_cvar("BombDefuse_Bonus", "10");
}

native 	fcs_get_user_credits(index);
native	fcs_set_user_credits(index, cantitate);

public DeathMsg()
{
	new iAttacker = read_data(1);
	new iVictim = read_data(2);
	new HeadShot = read_data(3);
	
	new Weapon = get_user_attacker(iVictim, Weapon);
	
	if(iAttacker == iVictim)
		return 1;
	else
	{
		if(Weapon == CSW_KNIFE)
			fcs_set_user_credits(iAttacker, fcs_get_user_credits(iAttacker) + get_pcvar_num(KnifeKillBonus));
		
		if(Weapon == CSW_HEGRENADE)
			fcs_set_user_credits(iAttacker, fcs_get_user_credits(iAttacker) + get_pcvar_num(HeGrenadeBonus));
			
		if(HeadShot && Weapon != CSW_KNIFE)
			fcs_set_user_credits(iAttacker, fcs_get_user_credits(iAttacker) + get_pcvar_num(HeadShot_Bonus));
			
		if(!HeadShot && Weapon != CSW_KNIFE && Weapon != CSW_HEGRENADE)
			fcs_set_user_credits(iAttacker, fcs_get_user_credits(iAttacker) + get_pcvar_num(KillBonus));	
	}
	
	return 1;
}
public bomb_planted(planter)
	fcs_set_user_credits(planter, fcs_get_user_credits(planter) + get_pcvar_num(BombPlant_Bonus));

public bomb_explode(planter)
	fcs_set_user_credits(planter, fcs_get_user_credits(planter) + get_pcvar_num(BombExplode_Bonus));
	
public bomb_defused(defuser)
	fcs_set_user_credits(defuser, fcs_get_user_credits(defuser) + get_pcvar_num(BombDefuse_Bonus));
Daca vrei si mesaje zi-mi ;))

EDIT : Cvaruri :

Code: Select all

HeadShot_Bonus
KillBonus
KnifeKillBonus
HeGrenadeBonus
BombPlant_Bonus
BombExplode_Bonus
BombDefuse_Bonus
EDIT 2:

Uite daca vrei cu tot cu mesajul hud:
| Afiseaza codul
#include <amxmodx>
#include <csx>

new const
	PLUGIN_NAME[]  =  "Kill Bonus Credits 'Askhanar System'",
	PLUGIN_VERSION[]  =  "1.0",
	PLUGIN_AUTHOR[]  =  "GhosT ***";
	
// pcvars

new HeadShot_Bonus, KillBonus, KnifeKillBonus, HeGrenadeBonus;
new BombPlant_Bonus, BombExplode_Bonus, BombDefuse_Bonus;
new SyncHudMessage;

public plugin_init()
{
	register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
	
	register_event("DeathMsg", "DeathMsg", "a");
	
	// Cvars
	
	HeadShot_Bonus = register_cvar("HeadShot_Bonus", "5");
	KillBonus = register_cvar("KillBonus", "3");
	KnifeKillBonus = register_cvar("KnifeKillBonus", "6");
	HeGrenadeBonus = register_cvar("HeGrenadeBonus", "7");
	
	BombPlant_Bonus = register_cvar("BombPlant_Bonus", "5");
	BombExplode_Bonus = register_cvar("BombExplode_Bonus", "5");
	BombDefuse_Bonus = register_cvar("BombDefuse_Bonus", "10");
	
	SyncHudMessage = CreateHudSyncObj();
}

native 	fcs_get_user_credits(index);
native	fcs_set_user_credits(index, cantitate);

public client_putinserver(id)
	set_task(1.0, "CreditsShowInformations", id, _, _, "b");
	
public client_disconnect(id)
	remove_task(id);

public CreditsShowInformations(id)
{
	if(!is_user_alive(id))
		return PLUGIN_HANDLED;
	else
	{
		set_hudmessage(0, 255, 255, 0.01, 0.90, 0, 6.0, 3600.0);
		ShowSyncHudMsg(id, SyncHudMessage, "HP: %d | Credite: %d", get_user_health(id), fcs_get_user_credits(id));
	}
	
	return false;
}
public DeathMsg()
{
	new iAttacker = read_data(1);
	new iVictim = read_data(2);
	new HeadShot = read_data(3);
	
	new Weapon = get_user_attacker(iVictim, Weapon);
	
	if(iAttacker == iVictim)
		return 1;
	else
	{
		if(Weapon == CSW_KNIFE)
			fcs_set_user_credits(iAttacker, fcs_get_user_credits(iAttacker) + get_pcvar_num(KnifeKillBonus));
		
		if(Weapon == CSW_HEGRENADE)
			fcs_set_user_credits(iAttacker, fcs_get_user_credits(iAttacker) + get_pcvar_num(HeGrenadeBonus));
			
		if(HeadShot)
			fcs_set_user_credits(iAttacker, fcs_get_user_credits(iAttacker) + get_pcvar_num(HeadShot_Bonus));
			
		if(!HeadShot && Weapon != CSW_KNIFE && Weapon != CSW_HEGRENADE)
			fcs_set_user_credits(iAttacker, fcs_get_user_credits(iAttacker) + get_pcvar_num(KillBonus));	
	}
	
	return 1;
}
public bomb_planted(planter)
	fcs_set_user_credits(planter, fcs_get_user_credits(planter) + get_pcvar_num(BombPlant_Bonus));

public bomb_explode(planter)
	fcs_set_user_credits(planter, fcs_get_user_credits(planter) + get_pcvar_num(BombExplode_Bonus));
	
public bomb_defused(defuser)
	fcs_set_user_credits(defuser, fcs_get_user_credits(defuser) + get_pcvar_num(BombDefuse_Bonus));
User avatar
Chris Duskblade
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 2785
Joined: 18 Jun 2013, 15:46
Detinator Steam: Da
Reputatie: Fost super moderator
Nume anterior: Cristinel.
Utilizator neserios (tepar)
Location: Timișoara
Has thanked: 62 times
Been thanked: 15 times
Contact:

03 Feb 2014, 22:15

Multumesc la toti pentru ajutor aveti toti THX , T.C un moderator :)>-
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:

04 Feb 2014, 11:59

Am o intrebare :-"

Pe-al cui l-ai pus :))?
Post Reply

Return to “Cereri”

  • Information