[CSGO] HP Reward 4 Kill

Descărcări de pluginuri și discuții despre acestea.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
tre3fla
Membru, skill +3
Membru, skill +3
Posts: 1044
Joined: 27 May 2012, 11:15
Detinator Steam: Da
CS Status: Allah Akbar !
Detinator server CS: Nu
SteamID: /id/tre3fla_xxx
Has thanked: 14 times
Been thanked: 129 times

02 Dec 2016, 20:28

Descarcare:
GirlShare | FileShare | Mega
HPperKill_Reward.sp | Afiseaza codul
/* Plugin Template generated by Pawn Studio */

#include <sourcemod>
#include <csgocolors>

new Handle: HPperKill
new Handle: HPperHS
new Handle: HPperKnife
new Handle: HPperNadeKill
new Handle: MaxHP

public Plugin:myinfo = {
	name = "HP per Kill",
	author = "tre3fla",
	description = "Primesti HP la fiecare frag",
	version = "1.0",
	url = "http://extreamcs.com/forum"
}

public OnPluginStart( ) {
	HPperKill = CreateConVar( "hp_per_normal_kill", "5", "HP primit pentru un frag normal" )
	HPperHS = CreateConVar( "hp_per_head_kill", "10", "HP primit pentru un frag cu headshot" )
	HPperKnife = CreateConVar( "hp_per_knife_kill", "15", "HP primit pentru un frag cu cutitul" )
	HPperNadeKill = CreateConVar( "hp_per_nade_kill", "8", "HP Primit pentru un frag cu o grenada" )
	MaxHP = CreateConVar( "max_hp_limit", "100", "HP-ul maxim care un jucator il poate avea !" )
	
	HookEvent( "player_death", Event_PlayerDeath )
}

public Action:Event_PlayerDeath( Handle:event, const String:name[ ], bool:dontBroadcast ) {
	new Victima = GetClientOfUserId( GetEventInt( event, "userid" ) )
	new Atacator = GetClientOfUserId( GetEventInt( event, "attacker" ) )
	
	if( Atacator <= 0 || Atacator > MaxClients ) { 
		return Plugin_Continue
	}
	
	if( !IsClientInGame( Victima ) ) {
		return Plugin_Handled
	}
	
	if( Victima == Atacator ) {
		return Plugin_Handled
	}
	
	new String: Nume[ 32 ]
	GetClientName( Victima, Nume, sizeof( Nume ) )
	
	new bool:Headshot = GetEventBool( event, "headshot" )
	
	char Arma[ 64 ]
	GetEventString( event, "weapon", Arma, sizeof( Arma ) )
	
	if( Headshot && GetConVarInt( HPperHS ) > 0 ) {
		new iHP = GetClientHealth( Atacator )
		
		if( iHP == GetConVarInt( MaxHP ) ) {
			return Plugin_Handled
		}
		
		iHP += GetConVarInt( HPperHS )
		
		if( iHP > GetConVarInt( MaxHP ) ) {
			iHP = GetConVarInt( MaxHP )
		}
		
		SetEntProp( Atacator, Prop_Data, "m_iHealth", iHP  )
		CPrintToChat( Atacator, "{RED}[Bonus]{NORMAL} L-ai ucis pe{GREEN} %s{NORMAL} si primit{BLUE} +%d HP", Nume, GetConVarInt( HPperHS ) )
	}
	else if( ( StrContains( Arma, "knife", false ) != -1 ) || ( StrContains( Arma, "bayonet", false ) != -1 ) && GetConVarInt( HPperKnife ) > 0 ) {
		new iHP = GetClientHealth( Atacator )
		
		if( iHP == GetConVarInt( MaxHP ) ) {
			return Plugin_Handled
		}
		
		iHP += GetConVarInt( HPperKnife )
		
		if( iHP > GetConVarInt( MaxHP ) ) {
			iHP = GetConVarInt( MaxHP )
		}
		
		SetEntProp( Atacator, Prop_Data, "m_iHealth", iHP  )
		CPrintToChat( Atacator, "{RED}[Bonus]{NORMAL} L-ai ucis pe{GREEN} %s{NORMAL} si primit{BLUE} +%d HP", Nume, GetConVarInt( HPperKnife ) )
	}
	else if( ( StrContains( Arma, "flashbang", false ) != -1 ) || ( StrContains( Arma, "smoke", false ) != -1 ) || ( StrContains( Arma, "hegrenade", false ) != -1 ) || ( StrContains( Arma, "molotov", false ) != -1 ) || ( StrContains( Arma, "incgrenade", false ) != -1 ) || ( StrContains( Arma, "decoy", false ) != -1 ) && GetConVarInt( HPperNadeKill ) > 0 ) {
		new iHP = GetClientHealth( Atacator )
		
		if( iHP == GetConVarInt( MaxHP ) )
		{
			return Plugin_Handled
		}
		
		iHP += GetConVarInt( HPperNadeKill )
		
		if( iHP > GetConVarInt( MaxHP ) ) {
			iHP = GetConVarInt( MaxHP )
		}
		
		SetEntProp( Atacator, Prop_Data, "m_iHealth", iHP  )
		CPrintToChat( Atacator, "{RED}[Bonus]{NORMAL} L-ai ucis pe{GREEN} %s{NORMAL} si primit{BLUE} +%d HP", Nume, GetConVarInt( HPperNadeKill ) )
	}
	else {
		if( GetConVarInt( HPperKill ) > 0 ) {
			new iHP = GetClientHealth( Atacator )
			
			if( iHP == GetConVarInt( MaxHP ) ) {
				return Plugin_Handled
			}
			
			iHP += GetConVarInt( HPperKill )
			
			if( iHP > GetConVarInt( MaxHP ) ) {
				iHP = GetConVarInt( MaxHP )
			}
			
			SetEntProp( Atacator, Prop_Data, "m_iHealth", iHP  )
			CPrintToChat( Atacator, "{RED}[Bonus]{NORMAL} L-ai ucis pe{GREEN} %s{NORMAL} si primit{BLUE} +%d HP", Nume, GetConVarInt( HPperKill ) )
		}
	}
	return Plugin_Continue
}
Nume: HP per Kill Rewards
Autor: tre3fla
Versiune: 1.0

Comenzi:
  • Nu exista !
Cvar-uri (se adauga in server.cfg)
  • max_hp_limit - HP maxim permis ( default: 100 )
  • hp_per_normal_kill - Cat de mult HP sa primeasca jucatorul pentru kill normal (default: 5)
  • hp_per_head_kill - Cat de mult HP sa primeasca jucatorul pentru un kill cu HS (default: 10)
  • hp_per_knife_kill - Cat de mult HP sa primeasca jucatorul pentru un kill cu cutitul (default: 15)
  • hp_per_nade_kill - Cat de mult HP sa primeasca jucatorul pentru un kill cu o grenada (default: 8 )
    Toate grenazile sunt luate in calcul, adica HE Grenade, Smoke, Flash, decoy si incendiare. Smoke, Flash si Decoy pot omora un jucator daca are 1 HP si il lovesc
Poze:
  • Nu sunt momentan, daca il foloseste cineva si lasa cateva screen-uri sunt binevenite !
Instalare:
1. Fisierul HPperKill_Reward.sp se adauga in addons/sourcemod/scripting
2. Fisierul HPperKill_Reward.smx se adauga in addons/sourcemod/plugins
3. Fisierul csgocolors.inc se adauga in addons/sourcemod/scripting/include

Orice modificare se ofera in topic, nu ofer modificari private prin PM !

PS: Plugin netestat, daca gasiti buguri sau erori va rog sa le postati si vor fi rezolvate !
RoyalServer
User avatar
Seve
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 158
Joined: 18 Aug 2012, 11:19
Detinator Steam: Da
Detinator server CS: GO.PLAYSIBIU.COM
SteamID: sevecsgo
Reputatie: Membru Club eXtreamCS (1 luna)
Utilizator neserios (tepar)
Has thanked: 83 times
Been thanked: 39 times
Contact:

02 Dec 2016, 20:32

Se poate sa faci acest plugin doar pentru vip flag a?
Va astept pe Go.PlaySibiu.Com [RO/128 tickrate]
Image
User avatar
tre3fla
Membru, skill +3
Membru, skill +3
Posts: 1044
Joined: 27 May 2012, 11:15
Detinator Steam: Da
CS Status: Allah Akbar !
Detinator server CS: Nu
SteamID: /id/tre3fla_xxx
Has thanked: 14 times
Been thanked: 129 times

02 Dec 2016, 20:42

Seve wrote:Se poate sa faci acest plugin doar pentru vip flag a?
HPperKill_Reward_VIP | Afiseaza codul
/* Plugin Template generated by Pawn Studio */

#include <sourcemod>
#include <csgocolors>

new Handle: HPperKill
new Handle: HPperHS
new Handle: HPperKnife
new Handle: HPperNadeKill
new Handle: MaxHP

public Plugin:myinfo = {
	name = "HP per Kill",
	author = "tre3fla",
	description = "Primesti HP la fiecare frag",
	version = "1.0",
	url = "http://extreamcs.com/forum"
}

public OnPluginStart( ) {
	HPperKill = CreateConVar( "hp_per_normal_kill", "5", "HP primit pentru un frag normal" )
	HPperHS = CreateConVar( "hp_per_head_kill", "10", "HP primit pentru un frag cu headshot" )
	HPperKnife = CreateConVar( "hp_per_knife_kill", "15", "HP primit pentru un frag cu cutitul" )
	HPperNadeKill = CreateConVar( "hp_per_nade_kill", "8", "HP Primit pentru un frag cu o grenada" )
	MaxHP = CreateConVar( "max_hp_limit", "100", "HP-ul maxim care un jucator il poate avea !" )
	
	HookEvent( "player_death", Event_PlayerDeath )
}

public Action:Event_PlayerDeath( Handle:event, const String:name[ ], bool:dontBroadcast ) {
	new Victima = GetClientOfUserId( GetEventInt( event, "userid" ) )
	new Atacator = GetClientOfUserId( GetEventInt( event, "attacker" ) )
	
	if( Atacator <= 0 || Atacator > MaxClients ) { 
		return Plugin_Continue
	}
	
	if( !IsClientInGame( Victima ) ) {
		return Plugin_Handled
	}
	
	if( Victima == Atacator ) {
		return Plugin_Handled
	}
	
	if( GetAdminFlag( GetUserAdmin( Atacator ), Admin_Reservation ) ) {
		new String: Nume[ 32 ]
		GetClientName( Victima, Nume, sizeof( Nume ) )
		
		new bool:Headshot = GetEventBool( event, "headshot" )
		
		char Arma[ 64 ]
		GetEventString( event, "weapon", Arma, sizeof( Arma ) )
		
		if( Headshot && GetConVarInt( HPperHS ) > 0 ) {
			new iHP = GetClientHealth( Atacator )
			
			if( iHP == GetConVarInt( MaxHP ) ) {
				return Plugin_Handled
			}
			
			iHP += GetConVarInt( HPperHS )
			
			if( iHP > GetConVarInt( MaxHP ) ) {
				iHP = GetConVarInt( MaxHP )
			}
			
			SetEntProp( Atacator, Prop_Data, "m_iHealth", iHP  )
			CPrintToChat( Atacator, "{RED}[Bonus]{NORMAL} L-ai ucis pe{GREEN} %s{NORMAL} si primit{BLUE} +%d HP", Nume, GetConVarInt( HPperHS ) )
		}
		else if( ( StrContains( Arma, "knife", false ) != -1 ) || ( StrContains( Arma, "bayonet", false ) != -1 ) && GetConVarInt( HPperKnife ) > 0 ) {
			new iHP = GetClientHealth( Atacator )
			
			if( iHP == GetConVarInt( MaxHP ) ) {
				return Plugin_Handled
			}
			
			iHP += GetConVarInt( HPperKnife )
			
			if( iHP > GetConVarInt( MaxHP ) ) {
				iHP = GetConVarInt( MaxHP )
			}
			
			SetEntProp( Atacator, Prop_Data, "m_iHealth", iHP  )
			CPrintToChat( Atacator, "{RED}[Bonus]{NORMAL} L-ai ucis pe{GREEN} %s{NORMAL} si primit{BLUE} +%d HP", Nume, GetConVarInt( HPperKnife ) )
		}
		else if( ( StrContains( Arma, "flashbang", false ) != -1 ) || ( StrContains( Arma, "smoke", false ) != -1 ) || ( StrContains( Arma, "hegrenade", false ) != -1 ) || ( StrContains( Arma, "molotov", false ) != -1 ) || ( StrContains( Arma, "incgrenade", false ) != -1 ) || ( StrContains( Arma, "decoy", false ) != -1 ) && GetConVarInt( HPperNadeKill ) > 0 ) {
			new iHP = GetClientHealth( Atacator )
			
			if( iHP == GetConVarInt( MaxHP ) )
			{
				return Plugin_Handled
			}
			
			iHP += GetConVarInt( HPperNadeKill )
			
			if( iHP > GetConVarInt( MaxHP ) ) {
				iHP = GetConVarInt( MaxHP )
			}
			
			SetEntProp( Atacator, Prop_Data, "m_iHealth", iHP  )
			CPrintToChat( Atacator, "{RED}[Bonus]{NORMAL} L-ai ucis pe{GREEN} %s{NORMAL} si primit{BLUE} +%d HP", Nume, GetConVarInt( HPperNadeKill ) )
		}
		else {
			if( GetConVarInt( HPperKill ) > 0 ) {
				new iHP = GetClientHealth( Atacator )
				
				if( iHP == GetConVarInt( MaxHP ) ) {
					return Plugin_Handled
				}
				
				iHP += GetConVarInt( HPperKill )
				
				if( iHP > GetConVarInt( MaxHP ) ) {
					iHP = GetConVarInt( MaxHP )
				}
				
				SetEntProp( Atacator, Prop_Data, "m_iHealth", iHP  )
				CPrintToChat( Atacator, "{RED}[Bonus]{NORMAL} L-ai ucis pe{GREEN} %s{NORMAL} si primit{BLUE} +%d HP", Nume, GetConVarInt( HPperKill ) )
			}
		}
	}
	return Plugin_Continue
}
Plugin Compilat ( stiu ca tu ai probleme cu compilarile ) :)) : http://www.girlshare.ro/3489611293.3
User avatar
Seve
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 158
Joined: 18 Aug 2012, 11:19
Detinator Steam: Da
Detinator server CS: GO.PLAYSIBIU.COM
SteamID: sevecsgo
Reputatie: Membru Club eXtreamCS (1 luna)
Utilizator neserios (tepar)
Has thanked: 83 times
Been thanked: 39 times
Contact:

02 Dec 2016, 21:01

tre3fla wrote:
Seve wrote:Se poate sa faci acest plugin doar pentru vip flag a?
HPperKill_Reward_VIP | Afiseaza codul
/* Plugin Template generated by Pawn Studio */

#include <sourcemod>
#include <csgocolors>

new Handle: HPperKill
new Handle: HPperHS
new Handle: HPperKnife
new Handle: HPperNadeKill
new Handle: MaxHP

public Plugin:myinfo = {
	name = "HP per Kill",
	author = "tre3fla",
	description = "Primesti HP la fiecare frag",
	version = "1.0",
	url = "http://extreamcs.com/forum"
}

public OnPluginStart( ) {
	HPperKill = CreateConVar( "hp_per_normal_kill", "5", "HP primit pentru un frag normal" )
	HPperHS = CreateConVar( "hp_per_head_kill", "10", "HP primit pentru un frag cu headshot" )
	HPperKnife = CreateConVar( "hp_per_knife_kill", "15", "HP primit pentru un frag cu cutitul" )
	HPperNadeKill = CreateConVar( "hp_per_nade_kill", "8", "HP Primit pentru un frag cu o grenada" )
	MaxHP = CreateConVar( "max_hp_limit", "100", "HP-ul maxim care un jucator il poate avea !" )
	
	HookEvent( "player_death", Event_PlayerDeath )
}

public Action:Event_PlayerDeath( Handle:event, const String:name[ ], bool:dontBroadcast ) {
	new Victima = GetClientOfUserId( GetEventInt( event, "userid" ) )
	new Atacator = GetClientOfUserId( GetEventInt( event, "attacker" ) )
	
	if( Atacator <= 0 || Atacator > MaxClients ) { 
		return Plugin_Continue
	}
	
	if( !IsClientInGame( Victima ) ) {
		return Plugin_Handled
	}
	
	if( Victima == Atacator ) {
		return Plugin_Handled
	}
	
	if( GetAdminFlag( GetUserAdmin( Atacator ), Admin_Reservation ) ) {
		new String: Nume[ 32 ]
		GetClientName( Victima, Nume, sizeof( Nume ) )
		
		new bool:Headshot = GetEventBool( event, "headshot" )
		
		char Arma[ 64 ]
		GetEventString( event, "weapon", Arma, sizeof( Arma ) )
		
		if( Headshot && GetConVarInt( HPperHS ) > 0 ) {
			new iHP = GetClientHealth( Atacator )
			
			if( iHP == GetConVarInt( MaxHP ) ) {
				return Plugin_Handled
			}
			
			iHP += GetConVarInt( HPperHS )
			
			if( iHP > GetConVarInt( MaxHP ) ) {
				iHP = GetConVarInt( MaxHP )
			}
			
			SetEntProp( Atacator, Prop_Data, "m_iHealth", iHP  )
			CPrintToChat( Atacator, "{RED}[Bonus]{NORMAL} L-ai ucis pe{GREEN} %s{NORMAL} si primit{BLUE} +%d HP", Nume, GetConVarInt( HPperHS ) )
		}
		else if( ( StrContains( Arma, "knife", false ) != -1 ) || ( StrContains( Arma, "bayonet", false ) != -1 ) && GetConVarInt( HPperKnife ) > 0 ) {
			new iHP = GetClientHealth( Atacator )
			
			if( iHP == GetConVarInt( MaxHP ) ) {
				return Plugin_Handled
			}
			
			iHP += GetConVarInt( HPperKnife )
			
			if( iHP > GetConVarInt( MaxHP ) ) {
				iHP = GetConVarInt( MaxHP )
			}
			
			SetEntProp( Atacator, Prop_Data, "m_iHealth", iHP  )
			CPrintToChat( Atacator, "{RED}[Bonus]{NORMAL} L-ai ucis pe{GREEN} %s{NORMAL} si primit{BLUE} +%d HP", Nume, GetConVarInt( HPperKnife ) )
		}
		else if( ( StrContains( Arma, "flashbang", false ) != -1 ) || ( StrContains( Arma, "smoke", false ) != -1 ) || ( StrContains( Arma, "hegrenade", false ) != -1 ) || ( StrContains( Arma, "molotov", false ) != -1 ) || ( StrContains( Arma, "incgrenade", false ) != -1 ) || ( StrContains( Arma, "decoy", false ) != -1 ) && GetConVarInt( HPperNadeKill ) > 0 ) {
			new iHP = GetClientHealth( Atacator )
			
			if( iHP == GetConVarInt( MaxHP ) )
			{
				return Plugin_Handled
			}
			
			iHP += GetConVarInt( HPperNadeKill )
			
			if( iHP > GetConVarInt( MaxHP ) ) {
				iHP = GetConVarInt( MaxHP )
			}
			
			SetEntProp( Atacator, Prop_Data, "m_iHealth", iHP  )
			CPrintToChat( Atacator, "{RED}[Bonus]{NORMAL} L-ai ucis pe{GREEN} %s{NORMAL} si primit{BLUE} +%d HP", Nume, GetConVarInt( HPperNadeKill ) )
		}
		else {
			if( GetConVarInt( HPperKill ) > 0 ) {
				new iHP = GetClientHealth( Atacator )
				
				if( iHP == GetConVarInt( MaxHP ) ) {
					return Plugin_Handled
				}
				
				iHP += GetConVarInt( HPperKill )
				
				if( iHP > GetConVarInt( MaxHP ) ) {
					iHP = GetConVarInt( MaxHP )
				}
				
				SetEntProp( Atacator, Prop_Data, "m_iHealth", iHP  )
				CPrintToChat( Atacator, "{RED}[Bonus]{NORMAL} L-ai ucis pe{GREEN} %s{NORMAL} si primit{BLUE} +%d HP", Nume, GetConVarInt( HPperKill ) )
			}
		}
	}
	return Plugin_Continue
}
Plugin Compilat ( stiu ca tu ai probleme cu compilarile ) :)) : http://www.girlshare.ro/3489611293.3
:))
L-am bagat si pe asta, functioneaza, multumesc frumos. E misto ca apare si mesaj in chat si doar tu il poti vedea.
Poza | Afiseaza codul
Image
Va astept pe Go.PlaySibiu.Com [RO/128 tickrate]
Image
Post Reply

Return to “Pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests