Cant dl It
BTW. Here, My (light) Version:
note:this plugin's never tested!
Code
#include <amxmodx>
#include <amxmisc>
#include <cstrike> // Should Use Fakemeta Or Engine (Or Both)
#include <fun> // These's Just Making More Module Needed
#define PLUGIN "Misc" // i like the old style
#define VERSION "0.0" // Has You Noticed?
#define AUTHOR "anko"
//new Add_Hp = 100;
/*new Add_Ar = 200;*/
//cvar
new Add_Hp;
new Add_Arm;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("amx_add_health", "add_health");
Add_Hp = register_cvar("amx_add_health_by", "100");
register_clcmd("amx_add_armor", "add_armor");
Add_Arm = register_cvar("amx_add_armor_by", "100");
register_clcmd("amx_give_grenade", "give_grenade");
register_event("HLTV", "Event_NewRound", "a", "1=0", "2=0");
}
public add_health(iIndex){
if(!is_user_alive(iIndex)) return; // I Should Make This As A Stock(Or Public)
if(!is_user_connected(iIndex)) return; // This Is Stupid
if(is_user_connecting(iIndex)) return; // This One Too
new Hp = get_user_health(iIndex);
set_user_health(iIndex, Hp + Add_Hp);
}
public add_armor(iIndex){
if(!is_user_alive(iIndex)) return; // Creating This
if(!is_user_connected(iIndex)) return; // is Just Wasting
if(is_user_connecting(iIndex)) return; // Time
new Ar = get_user_armor(iIndex);
set_user_armor(iIndex, Ar + Add_Arm);
}
/*
//I Should Use The Easiest Way
new const grenade[][] ={
CSW_HEGRENADE, CSW_FLASHBANG, CSW_SMOKEGRENADE
}
//Baka!
new Bool:Has_Added[33]
*/
public give_grenade(Index){
if(!is_user_alive(Index)) return;// At Least
if(!is_user_connected(Index)) return;// These Code
if(is_user_connecting(Index)) return// Work Perfectly
new Fl[1]; /* Firstly We(or i) Should Know What The Grenade's ClassName */
get_weaponname(CSW_FLASHBANG, Fl, charsmax(Fl));
new He[1]; //I Newer Know What These Entity's Classes
get_weaponname(CSW_HEGRENADE, He, charsmax(He));
new Sm[1]; //That's Why I Use These
get_weaponname(CSW_SMOKEGRENADE, Sm, charsmax(Sm));
//Poorly Coded, Should Use The Fastest Way
give_item(Index, Fl);
give_item(Index, He);
give_item(Index, Sm);
}
public Event_NewRound(){
new Players[32], Pnum, Index;
get_players(Players, Pnum, "a"); // Poorly Coded?
for(new i;i<Pnum;i++)
{
//All Players
Index = Players[i];
if(!is_user_alive(Index)) return;
if(!is_user_connected(Index)) return;
if(is_user_connecting(Index)) return
add_health(Index); // Fastest
// add_armor(Index); // Way?
give_grenade(Index);
// Set Health Event
// new Hp = get_user_health(index);
// set_user_health(index, Hp + Add_Hp);
// Set Armor Event
// new Ar = get_user_armor(index); Would Cause Unbalanced GamePlay
set_user_armor(Index, /* Ar + */ Add_Arm);
}
}
Quote
You Can 'Do' Everything You Wanted To. But, You Cant 'Be' Everything .-