Descriere: Acest plugin da viata bonus celui ce face FRAG si este folositor pentru serverele de respawn, dar merge pus pe orice server daca doriti.
Cvar-uri (se adauga in configs/amxx.cfg, le puteti edita dupa bunul plac):
bonus_status "1" // Activeaza sau Dezactiveaza pluginul.
bonus_maxhealth "150" // Pana la cat sa-i creasca viata.
bonus_kill "10" // Cat HP sa de-a pe KILL.
bonus_knife "100" // Cat HP sa de-a daca da LAMA.
bonus_headshot "15" // Cat HP sa de-a pe HEADSHOT.
bonus_knifeheadshot "150" // Cat HP sa de-a daca da HEADSHOT cu LAMA
Alte precizari: Are si mesaje puse de mine care apar in chat ( nu in HUD deoarece face LAG pentru cei ce nu stiu asta)
Spoiler
/* AMX Mod X Script
*
* LIMITZONE DEV Team
*
* ========---=========
* © 2017 by MIRAGETR
* www.limitzone.ro
* ========---=========
*
* This file is intended to be used with AMX Mod X
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#include <amxmodx>
#include <cstrike>
#include <fun>
static const PLUGIN_NAME[] = "BonusHP";
static const PLUGIN_AUTHOR[] = "MIRAGETR";
static const PLUGIN_VERSION[] = "1.0";
new cStatus, cMaxHealth;
new cKill, cKnife, cHeadshot, cKnifeHeadshot;
public plugin_init() {
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
cStatus = register_cvar("bonus_status", "1");
cMaxHealth = register_cvar("bonus_maxhealth", "150");
cKill = register_cvar("bonus_kill", "10");
cKnife = register_cvar("bonus_knife", "100");
cHeadshot = register_cvar("bonus_headshot", "15");
cKnifeHeadshot = register_cvar("bonus_knifeheadshot", "150");
register_event( "DeathMsg", "EventDeathMsg", "a", "1>0" );
}
public EventDeathMsg() {
new killer = read_data(1);
new victim = read_data(2);
new headshot = read_data(3);
new weapon = get_user_weapon(killer);
new num;
if(killer == victim || !get_pcvar_num(cStatus) || !is_user_connected(victim) || !is_user_alive(killer))
return PLUGIN_HANDLED;
if(headshot && weapon == CSW_KNIFE) {
num = get_pcvar_num(cKnifeHeadshot)
GiveHealth(killer, num)
chat_color(killer, "!gAi dat !theadshot!g cu !tLAMA!g, ai primit bonus !t+%i!g hp.", num)
} else if(headshot) {
num = get_pcvar_num(cHeadshot)
GiveHealth(killer, num)
chat_color(killer, "!gAi dat !theadshot!g, ai primit bonus !t+%i!g hp.", num)
} else if(weapon == CSW_KNIFE) {
num = get_pcvar_num(cKnife)
GiveHealth(killer, num)
chat_color(killer, "!gAi dat !tLAMA!g, ai primit bonus !t+%i!g hp.", num)
} else {
num = get_pcvar_num(cKill)
GiveHealth(killer, num)
chat_color(killer, "!gAi facut !tfrag!g, ai primit bonus !t+%i!g hp.", num)
}
return PLUGIN_CONTINUE;
}
GiveHealth(id, count)
set_user_health(id, min( (get_user_health(id) + count), get_pcvar_num(cMaxHealth) ))
stock chat_color(const id, const input[], any:...)
{
new count = 1, Jucatori[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4") // Culoarea Verde
replace_all(msg, 190, "!n", "^1") // Culoarea Normala a Chat-ului (galben)
replace_all(msg, 190, "!t", "^3") // Culoarea Echipei : CT = Albastru | T = Rosu.
if (id) Jucatori[0] = id; else get_players(Jucatori, count, "ch")
{
for (new Y = 0; Y < count; Y++)
{
if (is_user_connected(Jucatori[Y]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, Jucatori[Y])
write_byte(Jucatori[Y]);
write_string(msg);
message_end();
}
}
}
}