Raised This Month: $51 Target: $400
 12% 

HolySlap By BarMan


Post New Thread Reply   
 
Thread Tools Display Modes
Bo0m!
Veteran Member
Join Date: Mar 2006
Location: New Jersey
Old 05-27-2006 , 23:25  
Reply With Quote #21

lol... the sound file is in the main download zip...
__________________
Bo0m! is offline
Send a message via AIM to Bo0m! Send a message via MSN to Bo0m! Send a message via Yahoo to Bo0m!
Self-Serve
Member
Join Date: Jul 2008
Old 07-13-2008 , 06:45   Re: HolySlap By BarMan
Reply With Quote #22

Which flag is required to give an admin access to this command?
__________________
Self-Serve is offline
Send a message via AIM to Self-Serve
dhair
Junior Member
Join Date: Oct 2006
Location: Poland, Jastrzębie
Old 10-31-2010 , 19:11   Re: HolySlap By BarMan
Reply With Quote #23

Hello,
Nice work.
I've done little upgrade for my own needs. No wave file download required, this version uses gordon sounds included in hl1 package. The sounds are played before slapping and right after it. I've also changed the interval of slapping and added new name of cvar called by admin (amx_holyslap and amx_uberslap).
Oh, I almost forgot about i've changed the style of disarming the player because of the weapons (and c4package too) disappearing - now player is simply dropping down all weapons (excluding the grenades).

Maybe someone will need it as well. Any bug-finders reports required

Regards,
dhair

Code:
/* AMXMODX script.
* (c) Copyright 2004, TaL
* This file is provided as is (no warranties).
*
* AMX Holy Slap Plugin
*
* Slaps user 100 times 1HP at a time, then plays
* the attached sound as they fall out of the air
*
*
* usage: amx_holyslap authid, nick, or #userid
*
* Thanks to BarMan origonal Code
* Little upgrades made by dhair [PL]
*/

#include <amxmodx>
#include <amxmisc>
#include <fun>

public admin_slap(id,level,cid)
{
   if (!cmd_access(id,level,cid,2))
   return PLUGIN_HANDLED

   new name[32]
   new arg[32]
   read_argv(1,arg,31)
   new player = cmd_target(id,arg,5)
   if (!player)
   return PLUGIN_HANDLED

   new ids[2]
   ids[0] = player
   get_user_name(player,name,32)
   disarm_player(id,player)
   set_task(0.1, "first_words", 0, ids, 1, "a", 1)
   set_task(23.0, "last_words")
   return PLUGIN_HANDLED
}

public disarm_player(id,victim){
   new name[32]
   new iweapons[32], wpname[32], inum
   get_user_weapons(victim,iweapons,inum)
   for(new a=0;a<inum;++a){
      get_weaponname(iweapons[a],wpname,31)
      engclient_cmd(victim,"drop",wpname)
   }
   engclient_cmd(victim,"weapon_knife")
   get_user_name(victim,name,31)
   return PLUGIN_CONTINUE
}

public first_words(ids[]) {
   client_cmd(0,"spk barney/badfeeling")
   set_task(3.0, "slapper", 0, ids, 1, "a", 1)
   
   return PLUGIN_HANDLED
}


public slapper(ids[]) {
   set_task(0.2, "slap_player", 0, ids, 1, "a", 100)
   return PLUGIN_HANDLED
}


public last_words() {
   client_cmd(0,"spk hgrunt/c2a3_hg_laugh")
   return PLUGIN_HANDLED
}

public slap_player(ids[]) {
   new id = ids[0]
   new power1 = 1,nopower= 0
   if (get_user_health(id) > 1){
      user_slap(id,power1)
   } else {
      user_slap(id,nopower)
   }
   return PLUGIN_CONTINUE
}

public plugin_init(){
   register_plugin("AMXMODX Holy/Uber Slap","0.1.5","Ms-Proxy, upgrade by dhair [PL]")
   register_concmd("amx_holyslap","admin_slap",ADMIN_SLAY,"<authid, nick or #userid>")
   register_concmd("amx_uberslap","admin_slap",ADMIN_SLAY,"<authid, nick or #userid>")
   return PLUGIN_CONTINUE
}
Attached Files
File Type: sma Get Plugin or Get Source (holyslap.sma - 456 views - 2.1 KB)
dhair is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode