#include #include #include #include #include new AgrXP, ApaXP, BarXP, BigXP, BulXP, ConXP, GarXP, HeaXP, HouXP, HasXP, HgrXP, SciXP, IslXP, SnaXP, ZomXP //---------------------------------------------------------------------------------------------- public plugin_init() { // Plugin Info register_plugin("SUPERHERO Monster XP", "2.1", "Sam Tsuki / Fr33m@n") // DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG AgrXP = register_cvar("mxp_agrunt_xp", "15") ApaXP = register_cvar("mxp_apache_xp", "20") BarXP = register_cvar("mxp_barney_xp", "15") BigXP = register_cvar("mxp_bigmomma_xp", "25") BulXP = register_cvar("mxp_bullsquid_xp", "5") ConXP = register_cvar("mxp_controller_xp", "15") GarXP = register_cvar("mxp_gargantua_xp", "50") HeaXP = register_cvar("mxp_headcrab_xp", "3") HouXP = register_cvar("mxp_houndeye_xp", "5") HasXP = register_cvar("mxp_hassassin_xp", "15") HgrXP = register_cvar("mxp_hgrunt_xp", "15") SciXP = register_cvar("mxp_scientist_xp", "1") IslXP = register_cvar("mxp_islave_xp", "10") SnaXP = register_cvar("mxp_snark_xp", "1") ZomXP = register_cvar("mxp_zombie_xp", "10") //HAMSANDWICH RegisterHam(Ham_Killed, "func_wall", "monster_killed", 1) } //---------------------------------------------------------------------------------------------- public monster_killed(monster, attacker, shouldgib) { //if ( !sh_is_active() ) return if ( pev(monster, pev_flags) & FL_MONSTER && pev(monster, pev_max_health) != 5 && is_user_alive(attacker) ) { new monsterModel[32], monsterName[15], xp pev(monster, pev_model, monsterModel, charsmax(monsterModel)) if ( equal(monsterModel, "models/agrunt.mdl") ) { monsterName = "Alien Grunt" xp = get_pcvar_num(AgrXP) } else if ( equal(monsterModel, "models/apache.mdl") ) { monsterName = "Apache" xp = get_pcvar_num(ApaXP) } else if ( equal(monsterModel, "models/barney.mdl") ) { monsterName = "Barney" xp = get_pcvar_num(BarXP) } else if ( equal(monsterModel, "models/big_mom.mdl") ) { monsterName = "Big Momma" xp = get_pcvar_num(BigXP) } else if ( equal(monsterModel, "models/bullsquid.mdl") ) { monsterName = "Bull Squid" xp = get_pcvar_num(BulXP) } else if ( equal(monsterModel, "models/controller.mdl") ) { monsterName = "Controller" xp = get_pcvar_num(ConXP) } else if ( equal(monsterModel, "models/garg.mdl") ) { monsterName = "Gargantua" xp = get_pcvar_num(GarXP) } else if ( equal(monsterModel, "models/headcrab.mdl") ) { monsterName = "Head Crab" xp = get_pcvar_num(HeaXP) } else if ( equal(monsterModel, "models/houndeye.mdl") ) { monsterName = "Hound Eye" xp = get_pcvar_num(HouXP) } else if ( equal(monsterModel, "models/hassassin.mdl") ) { monsterName = "Human Assassin" xp = get_pcvar_num(HasXP) } else if ( equal(monsterModel, "models/hgrunt.mdl") ) { monsterName = "Human Grunt" xp = get_pcvar_num(HgrXP) } else if ( equal(monsterModel, "models/scientist.mdl") ) { monsterName = "Scientist" xp = get_pcvar_num(SciXP) } else if ( equal(monsterModel, "models/islave.mdl") ) { monsterName = "Slave" xp = get_pcvar_num(IslXP) } else if ( equal(monsterModel, "models/w_squeak.mdl") ) { monsterName = "Snark" xp = get_pcvar_num(SnaXP) } else if ( equal(monsterModel, "models/zombie.mdl") ) { monsterName = "Zombie" xp = get_pcvar_num(ZomXP) } else { return } if ( xp <= 0 ) return new addxp = db_get_user_xp(attacker) + xp db_set_user_xp(attacker, addxp) client_print(attacker, print_chat, "Dostales %d XP za zabicie %s", xp, monsterName) new namea[32] get_user_name(attacker, namea, charsmax(namea)) new players[32], numplayers, player get_players(players, numplayers, "h") for ( new i = 0; i < numplayers; i++ ) { player = players[i] if (player != attacker) { client_print(player, print_chat, "%s zabil %s (%d XP)", namea, monsterName, xp) } } if(db_get_user_item(id) == 0) db_set_user_item(id,0) } } //---------------------------------------------------------------------------------------------- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par } */