Code:
/* CowsTouch Plugin 2.00 By Cows *
*
* This Plugin Basically Lets You Turn On Or Off Counter-Strike Slap Match.
* If "tvt" Mode Is On.. "Team Vs Team" , Then Only The Player Can Slap The Opposite Team.
* If "ffa" Mode Is On.. "Free For All" , Then The Player Can Slap The Same Team Member.
*
* This Plugin Is Made For Water Maps With Ground On It, So Then When The Player Gets Slapped,
* They Can Try To Get Into The Water So They Dont Die. I Tried This Plugin On My Server And It
* Was A Great Success.
*
* ** I Fixed The Code From Top 2 Bottom, Removing Any Useless Stuff And Also
* Making The Code Much Cleaner **
*
* Credits: I Give Credits To GHWChronic915 For Helping Me.
*
* Cvars: sv_tft 0/1 , Turns Off/On Team Vs Team Mode !
* sv_ffa 0/1 , Turns Off/On Free For All Mode !
* If Both Cvars Are On Then Basically Your Using FFA But With Double Slap..
* Meaning You Will Be Slapped Harder.
*
* PS: Your Slapped With 0 Damage But You Dont See It.
*
*/
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
public plugin_init()
{
register_plugin("CowsTouch","1.00","Cows")
register_cvar("sv_tvt","1")
register_cvar("sv_ffa","0")
register_clcmd("say /cowstouch","DISPLAY")
}
public pfn_touch(ptr,ptd)
{
if(get_cvar_num("sv_tvt") == 1 && ptr<=get_maxplayers() && ptd<=get_maxplayers() && is_user_alive(ptr) && is_user_alive(ptd))
{
if(cs_get_user_team(ptr) != cs_get_user_team(ptd))
{
user_slap(ptr,0)
user_slap(ptd,0)
}
}
if(get_cvar_num("sv_ffa") == 1 && ptr<=get_maxplayers() && ptd<=get_maxplayers() && is_user_alive(ptr) && is_user_alive(ptd))
{
user_slap(ptr,0)
user_slap(ptd,0)
}
}
public DISPLAY(id)
{
if(get_cvar_num("sv_tvt") == 1 && get_cvar_num("sv_ffa") == 1)
{
client_print(id,print_chat,"[AMXX] CowsTouch Plugin 2.00 By Cows Is Currently In [Double Power 'TVT & FFA'] Mode !")
client_print(id,print_chat,"[AMXX] Download This Plugin At http://cows.spreebb.com")
}
else if(get_cvar_num("sv_tvt") == 1)
{
client_print(id,print_chat,"[AMXX] CowsTouch Plugin 2.00 By Cows Is Currently In [TVT] Mode !")
client_print(id,print_chat,"[AMXX] Download This Plugin At http://cows.spreebb.com")
}
else if(get_cvar_num("sv_ffa") == 1)
{
client_print(id,print_chat,"[AMXX] CowsTouch Plugin 2.00 By Cows Is Currently In [FFA] Mode !")
client_print(id,print_chat,"[AMXX] Download This Plugin At http://cows.spreebb.com")
}
else
{
client_print(id,print_chat,"[AMXX] CowsTouch Plugin 2.00 By Cows Is Currently [DISABLED] !")
}
}