Witam Przedstawiam wam plugin nie mój ale edytowany i z naprawionymi bugami. Polega on na tym iż jezeli za długo trzymamy granat w ręce to on nam wybucha i traci HP.
USUNIĘTO BUG z: Jeżeli padniemy przez twe he to w next rundzie nie zabija na HS oraz inne
public plugin_precache() { g_ExplosionMdl = precache_model("sprites/zerogxplode.spr") g_SmokeMdl = precache_model("sprites/steam1.spr") }
public plugin_modules() { require_module("engine") }
public client_PreThink(id) { if(is_user_connected(id) && is_user_alive(id)) { new u_Weapon, w_Clip, w_Ammo, w_Name[32], szMessage[164]
if((entity_get_int(id, EV_INT_button) & IN_ATTACK)) { // Player is in attack.. check his weapon u_Weapon = get_user_weapon(id, w_Clip, w_Ammo)
// If the player dont have a weapon..stop!... if(!u_Weapon) { return PLUGIN_HANDLED }
get_weaponname(u_Weapon, w_Name, 31) // Check if the weapon is the he grenade if(equal(w_Name, "weapon_hegrenade") && !done[id] && !task[id]) {
// make the task set_task(EXPLODE_DELAY, "make_explode", id) task[id] = true
} else { // Player switched his weapon... remove task if(task_exists(id) && !task[id]) { remove_task(id) } }
} else if(task_exists(id) && !task[id]) { // Player is not in attack anymore.. remove task remove_task(id) }
} return PLUGIN_CONTINUE }
public make_explode(id) {
if(!task[id]) return
new u_Grenade, g_hs new uWeaponName[32]
// Make the explosion make_explosion(id, g_ExplosionMdl, g_SmokeMdl)
// Kill the player and make a deathMSG user_silentkill(id) g_hs = random_num(0, 1) format(uWeaponName, 31, "grenade") make_deathmsg(0 , id, g_hs, uWeaponName)
// Remove the grenade u_Grenade = get_grenade(id) remove_entity(u_Grenade)
done[id] = true
}
public rst_done() { new g_plNum = get_playersnum() for(new i = 1; i <= g_plNum; i++) { if(done[i]){