Raised This Month: $ Target: $400
 0% 

How do I stop people from spamming a command


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 07-15-2007 , 16:16   Re: How do I stop people from spamming a command
Reply With Quote #8

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fun> #define PLUGIN "FartMod" #define VERSION "1.0" #define AUTHOR "Alex gomez" new lastFart[33], lastBurp[33] public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("say /fart","fart")     register_clcmd("say /burp","burp") } public overhear(a,distance,Speech[]) {         new OriginA[3], OriginB[3]     get_user_origin(a,OriginA)     new players[32], num     get_players(players,num,"ac")     for(new b = 0; b < num;b++)     {         if(a!=players[b])         {             get_user_origin(players[b],OriginB)             if(distance == -1)             {                 client_print(players[b],print_chat,Speech)             }             else             {                 if(get_distance(OriginA,OriginB) <= distance)                 {                     client_print(players[b],print_chat,Speech)                 }             }         }     }     return PLUGIN_HANDLED } public fart(id) {     new currentTime = get_systime()     if(lastFart[id] + 60 > currentTime)     {         return PLUGIN_HANDLED     }         lastFart[id] = currentTime         new name[64]     get_user_name(id,name,63)     emit_sound(id, CHAN_STREAM, "fartmod/fart1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     client_print(id, print_chat, "[FartMod] You ripped humungo ass on someone!")     new message[300]     format(message,299,"[FartMod] %s has ripped humungo ass on you!.",name)     overhear(id,300,message)         return PLUGIN_HANDLED } public burp(id) {     new currentTime = get_systime()     if(lastBurp[id] + 60 > currentTime)     {         return PLUGIN_HANDLED     }         lastBurp[id] = currentTime         new name[64]     get_user_name(id,name,63)     emit_sound(id, CHAN_STREAM, "fartmod/burp1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     client_print(id, print_chat, "[BurpMod] You let out a burp from hell!")     new message[300]     format(message,299,"[FartMod] %s burped on you!.",name)     overhear(id,300,message)         return PLUGIN_HANDLED } public plugin_precache() {     precache_sound("fartmod/fart1.wav")     precache_sound("fartmod/burp1.wav") }
Lee is offline
 



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 21:24.


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