Modificare Plugin +20 HP la knife si +20 HP la HE grenada[rezolvat!]
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
-
- 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:
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
- Laurentiu P.
- 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:
Pune sursa în [.code][/code]
no...
-
- 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:
- CyBer[N]eTicK
- 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:
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()
}
}
}
}
-
- 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:
multumesc e ok