Modificare Plugin +20 HP la knife si +20 HP la HE grenada[rezolvat!]

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
Shuya
Membru, skill 0
Membru, skill 0
Posts: 76
Joined: 22 Feb 2019, 18:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Location: Harlau
Contact:

20 Feb 2023, 09:50

Doresc si eu o modificare la acest plugin https://files.fm/u/6abdqaqns sa fie adaugat +20 HP la knife si +20 HP la HE grenada multunesc
RoyalServer
User avatar
Laurentiu P.
Fost moderator
Fost moderator
Posts: 2549
Joined: 10 Jul 2013, 21:26
Detinator Steam: Da
Reputatie: Fost super moderator
Fond eXtream: 100
Has thanked: 26 times
Been thanked: 62 times
Contact:

20 Feb 2023, 11:04

Pune sursa în [.code][/code]
no...
Shuya
Membru, skill 0
Membru, skill 0
Posts: 76
Joined: 22 Feb 2019, 18:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Location: Harlau
Contact:

20 Feb 2023, 12:22

| Afiseaza codul
 #include <amxmodx>
#include <cstrike>
#include <csx>

#define PLUGIN "Bonus Bomb & Kill"
#define VERSION "1.7"
#define AUTHOR "Lulu"

const MAX_PLAYERS = 30 // numar total sloturi server

new PCvarKnife
new PCvarGrenade
new bool:planter[MAX_PLAYERS + 1] // inregistreaza ultimul plantator al bombei

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_dictionary("bonusbombkill.txt")
	register_cvar("amx_restrict_bonus_knife","1")
	register_cvar("amx_restrict_bonus_grenade","1")
	PCvarKnife = register_cvar("amx_bonus_knife", "800")
	PCvarGrenade = register_cvar("amx_bonus_grenade", "800")
	register_event("HLTV", "NewRound", "a", "1=0", "2=0")
}

public NewRound()
{
// reseteaza statusul la fiecare inceput de runda
	for(new i; i < MAX_PLAYERS + 1; i++)
  	{
	planter = false
   	}
}

public client_disconnect(id)
{
// pentru a nu da banii pentru explozia bombei unui jucator nou intrat ce a ocupat slotul celui ce a plantat
	if(planter[id])
   	{
	planter[id] = false
   	}
}

public client_death ( killer, victim, wpnindex, hitplace, TK )
// + BONUS - primeste bonus daca iti omori adversarul cu cutitul sau cu grenada, nu primesti daca faci doar dmg
{
// ti-ai omorat adversarul cu cutitul
	new restrict_bonus_knife = get_cvar_num("amx_restrict_bonus_knife")
	new restrict_bonus_grenade = get_cvar_num("amx_restrict_bonus_grenade")
	new selfkill = (victim == killer) ? true : false
	if ((!selfkill) && is_user_connected(killer) && restrict_bonus_knife) 
	{
	if ( wpnindex == CSW_KNIFE )
	{
	new bonus = get_pcvar_num(PCvarKnife)
	set_money(killer, bonus)
	
	static nume[32], nume2[32]
	get_user_name(killer, nume, 31)
	get_user_name(victim, nume2, 31)
	chat_color(0,"%L", 0, "BONUS_KNIFE", nume, nume2, bonus)
	}
}
// ti-ai omorat adversarul cu grenada
	if ((!selfkill) && is_user_connected(killer) && restrict_bonus_grenade) 
	{
	if ( wpnindex == CSW_HEGRENADE )
	{
	new bonus = get_pcvar_num(PCvarGrenade)
	set_money(killer, bonus)
	
	static nume[32], nume2[32]
	get_user_name(killer, nume, 31)
	get_user_name(victim, nume2, 31)
	chat_color(0,"%L", 0, "BONUS_GRENADE", nume, nume2, bonus)
		}
	}
}

set_money(id, bonus)
{
	new money = cs_get_user_money(id)
	new total = money + bonus

	if(total < 16000)
   	{
	cs_set_user_money(id, total)
}

// pentru a nu da mai multi bani de 16000
	else
   	{
	cs_set_user_money(id, 16000)
   	}
}

stock chat_color(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
 
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!t", "^3")
 
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players)
write_byte(players)
write_string(msg)
message_end()
}
}
}
}


in link de download este si fisererul txt unde apar mesajele in chat multumesc
User avatar
CyBer[N]eTicK
Membru, skill +1
Membru, skill +1
Posts: 190
Joined: 29 May 2020, 05:35
Detinator Steam: Da
CS Status: Strong & Original
Detinator server CS: BB.BLACKGAMES.RO
SteamID: /id/cybernetick_cbk/
Fond eXtream: 0
Location: Albania, tirana
Discord: cybernetick_cbk
Has thanked: 21 times
Been thanked: 18 times
Contact:

20 Feb 2023, 18:56

Shuya wrote:
20 Feb 2023, 12:22
| Afiseaza codul
 #include <amxmodx>
#include <cstrike>
#include <csx>

#define PLUGIN "Bonus Bomb & Kill"
#define VERSION "1.7"
#define AUTHOR "Lulu"

const MAX_PLAYERS = 30 // numar total sloturi server

new PCvarKnife
new PCvarGrenade
new bool:planter[MAX_PLAYERS + 1] // inregistreaza ultimul plantator al bombei

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_dictionary("bonusbombkill.txt")
	register_cvar("amx_restrict_bonus_knife","1")
	register_cvar("amx_restrict_bonus_grenade","1")
	PCvarKnife = register_cvar("amx_bonus_knife", "800")
	PCvarGrenade = register_cvar("amx_bonus_grenade", "800")
	register_event("HLTV", "NewRound", "a", "1=0", "2=0")
}

public NewRound()
{
// reseteaza statusul la fiecare inceput de runda
	for(new i; i < MAX_PLAYERS + 1; i++)
  	{
	planter = false
   	}
}

public client_disconnect(id)
{
// pentru a nu da banii pentru explozia bombei unui jucator nou intrat ce a ocupat slotul celui ce a plantat
	if(planter[id])
   	{
	planter[id] = false
   	}
}

public client_death ( killer, victim, wpnindex, hitplace, TK )
// + BONUS - primeste bonus daca iti omori adversarul cu cutitul sau cu grenada, nu primesti daca faci doar dmg
{
// ti-ai omorat adversarul cu cutitul
	new restrict_bonus_knife = get_cvar_num("amx_restrict_bonus_knife")
	new restrict_bonus_grenade = get_cvar_num("amx_restrict_bonus_grenade")
	new selfkill = (victim == killer) ? true : false
	if ((!selfkill) && is_user_connected(killer) && restrict_bonus_knife) 
	{
	if ( wpnindex == CSW_KNIFE )
	{
	new bonus = get_pcvar_num(PCvarKnife)
	set_money(killer, bonus)
	
	static nume[32], nume2[32]
	get_user_name(killer, nume, 31)
	get_user_name(victim, nume2, 31)
	chat_color(0,"%L", 0, "BONUS_KNIFE", nume, nume2, bonus)
	}
}
// ti-ai omorat adversarul cu grenada
	if ((!selfkill) && is_user_connected(killer) && restrict_bonus_grenade) 
	{
	if ( wpnindex == CSW_HEGRENADE )
	{
	new bonus = get_pcvar_num(PCvarGrenade)
	set_money(killer, bonus)
	
	static nume[32], nume2[32]
	get_user_name(killer, nume, 31)
	get_user_name(victim, nume2, 31)
	chat_color(0,"%L", 0, "BONUS_GRENADE", nume, nume2, bonus)
		}
	}
}

set_money(id, bonus)
{
	new money = cs_get_user_money(id)
	new total = money + bonus

	if(total < 16000)
   	{
	cs_set_user_money(id, total)
}

// pentru a nu da mai multi bani de 16000
	else
   	{
	cs_set_user_money(id, 16000)
   	}
}

stock chat_color(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
 
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!t", "^3")
 
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players)
write_byte(players)
write_string(msg)
message_end()
}
}
}
}


in link de download este si fisererul txt unde apar mesajele in chat multumesc

Code: Select all

#include <amxmodx>
#include <cstrike>
#include <csx>
#include <fun>

#define PLUGIN "Bonus Bomb & Kill"
#define VERSION "1.7"
#define AUTHOR "Lulu"

const MAX_PLAYERS = 30 // numar total sloturi server

new PCvarKnife
new PCvarGrenade
new bool:planter[MAX_PLAYERS + 1] // inregistreaza ultimul plantator al bombei

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_dictionary("bonusbombkill.txt")
	register_cvar("amx_restrict_bonus_knife","1")
	register_cvar("amx_restrict_bonus_grenade","1")
	PCvarKnife = register_cvar("amx_bonus_knife", "800")
	PCvarGrenade = register_cvar("amx_bonus_grenade", "800")
	register_event("HLTV", "NewRound", "a", "1=0", "2=0")
}

public NewRound()
{
// reseteaza statusul la fiecare inceput de runda
	for(new i; i < MAX_PLAYERS + 1; i++)
  	{
	planter[i] = false
   	}
}

public client_disconnect(id)
{
// pentru a nu da banii pentru explozia bombei unui jucator nou intrat ce a ocupat slotul celui ce a plantat
	if(planter[id])
   	{
	planter[id] = false
   	}
}

public client_death ( killer, victim, wpnindex, hitplace, TK )
// + BONUS - primeste bonus daca iti omori adversarul cu cutitul sau cu grenada, nu primesti daca faci doar dmg
{
// ti-ai omorat adversarul cu cutitul
	new restrict_bonus_knife = get_cvar_num("amx_restrict_bonus_knife")
	new restrict_bonus_grenade = get_cvar_num("amx_restrict_bonus_grenade")
	new selfkill = (victim == killer) ? true : false
	if ((!selfkill) && is_user_connected(killer) && restrict_bonus_knife) 
	{
	if ( wpnindex == CSW_KNIFE )
	{
	new bonus = get_pcvar_num(PCvarKnife)
	set_money(killer, bonus)
	set_user_health(killer, get_user_health(killer) + 20);
	static nume[32], nume2[32]
	get_user_name(killer, nume, 31)
	get_user_name(victim, nume2, 31)
	chat_color(0,"%L", 0, "BONUS_KNIFE", nume, nume2, bonus)
	}
}
// ti-ai omorat adversarul cu grenada
	if ((!selfkill) && is_user_connected(killer) && restrict_bonus_grenade) 
	{
	if ( wpnindex == CSW_HEGRENADE )
	{
	new bonus = get_pcvar_num(PCvarGrenade)
	set_money(killer, bonus)
	set_user_health(killer, get_user_health(killer) + 20);
	static nume[32], nume2[32]
	get_user_name(killer, nume, 31)
	get_user_name(victim, nume2, 31)
	chat_color(0,"%L", 0, "BONUS_GRENADE", nume, nume2, bonus)
		}
	}
}

set_money(id, bonus)
{
	new money = cs_get_user_money(id)
	new total = money + bonus

	if(total < 16000)
   	{
	cs_set_user_money(id, total)
}

// pentru a nu da mai multi bani de 16000
	else
   	{
	cs_set_user_money(id, 16000)
   	}
}

stock chat_color(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
 
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!t", "^3")
 
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i])
write_string(msg)
message_end()
}
}
}
}
Shuya
Membru, skill 0
Membru, skill 0
Posts: 76
Joined: 22 Feb 2019, 18:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Location: Harlau
Contact:

27 Mar 2023, 21:30

multumesc e ok
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 13 guests