[CSGO] Bomb Events: Money Rewards

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

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
tre3fla
Membru eXtream
Membru eXtream
Posts: 5317
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, 17:28

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

#include <sourcemod>
#include <smlib>
#include <csgocolors>

new Handle: PlantReward
new Handle: DefuseReward
new Handle: ExplodeReward

public Plugin:myinfo = {
	name = "Bomb Events: Money Rewards",
	author = "tre3fla",
	description = "Recompense in bani pentru cei care dau plant/def",
	version = "1.0",
	url = "http://extreamcs.com/forum"
}

public OnPluginStart( ) {
	HookEvent( "bomb_planted", Event_BombPlanted )
	HookEvent( "bomb_defused", Event_BombDefused )
	HookEvent( "bomb_exploded", Event_BombExploded )
	
	PlantReward = CreateConVar( "bomb_plant_reward", "300", "Cati bani primeste plantatorul bombei" )
	DefuseReward = CreateConVar( "bomb_defuse_reward", "300", "Cati bani primeste cel care dezamorseaza bomba" )
	ExplodeReward = CreateConVar( "bomb_explode_reward", "150", "Cati bani sa primeasca plantatorul bombei daca bomba explodeaza" )
}

public Action:Event_BombPlanted( Handle:event, const String:name[], bool:dontBroadcast ) {
	new client = GetClientOfUserId( GetEventInt( event, "userid" ) )
	
	if( client > 0 && IsClientInGame( client ) && GetConVarInt( PlantReward ) > 0 ) {	
		new iMoney = Client_GetMoney( client )
		iMoney += GetConVarInt( PlantReward )
		
		Client_SetMoney( client, iMoney )
		
		decl String: Nume[ 32 ]
		GetClientName( client, Nume, sizeof( Nume ) )
		
		CPrintToChatAll( "{RED}[Reward]{GREEN} %s{NORMAL} a plantat bomba. Recompensa:{LIGHTGREEN} $%d", Nume, GetConVarInt( PlantReward ) ) 
	}
}

public Action:Event_BombDefused( Handle:event, const String:name[], bool:dontBroadcast ) {
	new client = GetClientOfUserId( GetEventInt( event, "userid" ) )
	
	if( client > 0 && IsClientInGame( client ) && GetConVarInt( DefuseReward ) > 0 ) {	
		new iMoney = Client_GetMoney( client )
		iMoney += GetConVarInt( DefuseReward )
		
		Client_SetMoney( client, iMoney )
		
		decl String: Nume[ 32 ]
		GetClientName( client, Nume, sizeof( Nume ) )
		
		CPrintToChatAll( "{RED}[Reward]{GREEN} %s{NORMAL} a dezamorsat bomba. Recompensa:{LIGHTGREEN} $%d", Nume, GetConVarInt( DefuseReward ) ) 
	}
}

public Action:Event_BombExploded( Handle:event, const String:name[], bool:dontBroadcast ) {
	int client = GetClientOfUserId( GetEventInt( event, "userid" ) )
	
	if( client > 0 && IsClientInGame( client ) && GetConVarInt( ExplodeReward ) > 0 ) {	
		new iMoney = Client_GetMoney( client )
		iMoney += GetConVarInt( ExplodeReward )
		
		Client_SetMoney( client, iMoney )
		
		decl String: Nume[ 32 ]
		GetClientName( client, Nume, sizeof( Nume ) )
		
		CPrintToChatAll( "{RED}[Reward]{NORMAL} Bomba plantata de{GREEN} %s{NORMAL} a explodat. Recompensa:{LIGHTGREEN} $%d", Nume, GetConVarInt( ExplodeReward ) ) 
	}
}
Nume: Bomb Plant: Money Rewards
Autor: tre3fla
Versiune: 1.0

Descriere:
Acesta este un remake al pluginului Bomb Plant: Money Rewards care era scris folosind nativele AMXMODX. A fost rescris pentru csgo folosind nativele Sourcemod 1.7+ !

Comenzi:
  • Nu exista !
Cvar-uri (se adauga in server.cfg)
  • bomb_plant_reward - Cati bani sa primeasca plantatorul bombei ( min 1, max 16.000, default: 300)
  • bomb_defuse_reward - Cati bani sa primeasca cel care dezamorseaza bomba (min 1, max 16.000, default :300)
  • bomb_explode_reward - Cati bani sa primeasca cel care a plantat bomba daca aceasta explodeaza (min 1, max 16.000, default: 150 )
  • Setand un cvar la valoarea 0 il dezactiveaza ( si functia de care depinde la fel, bineinteles )
Poze:
Poze [Multumiri Seve | Afiseaza codul
]Image
Image
Instalare:
1. Fisierul BombPlant_MoneyRewards.sp se adauga in addons/sourcemod/scripting
2. Fisierul BombPlant_MoneyRewards.smx se adauga in addons/sourcemod/plugins
3. Fisierul csgocolors.inc se adauga in addons/sourcemod/scripting/include

Orice modificare a pluginului se ofera in topic, nu ofer modificari private prin PM !
Last edited by tre3fla on 02 Dec 2016, 20:00, edited 1 time in total.
RoyalServer
User avatar
Seve
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 555
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, 19:12

L-am bagat pe serverul meu, functioneaza perfect!

Image
Image
Va astept pe Go.PlaySibiu.Com [RO/128 tickrate]
Image
User avatar
tre3fla
Membru eXtream
Membru eXtream
Posts: 5317
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:01

Mersi fain. Am dat edit.

Voi posta zilnic daca o sa pot cate un plugin, majoritate sunt remake-uri ale pluginelor de pe 1.6, rescrise pentru CSGO.
Post Reply

Return to “Pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests