Raised This Month: $32 Target: $400
 8% 

amx_gag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
marcopollo
Member
Join Date: Mar 2011
Old 08-18-2011 , 12:02   amx_gag
Reply With Quote #1

Hi, so i have this plugin and i want the command "amx_gag name time" to be only "amx_gag name" the time option for the admin to not exist and to be 600 seconds like default, so the next time admin gag someone use "amx_gag name" and take automaticaly #define DEFAULT_TIME 600.0 . I know that is optionaly and i can use only "amx_gag name" right now but i want the function optional "time" to be removed so admin don't use.
Attached Files
File Type: sma Get Plugin or Get Source (amx_gag.sma - 2120 views - 10.8 KB)
__________________
marcopollo is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 08-18-2011 , 12:09   Re: amx_gag
Reply With Quote #2

http://forums.alliedmods.net/showthr...hlight=amx+gag

Quote:
You can enter only <name or #userid> - time will be setted by amx_defaut_gag_time cvar & all flags will be given.
__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-18-2011 , 12:10   Re: amx_gag
Reply With Quote #3

Change these lines (222 - 249):
Code:
    new szFlags[ 4 ], Float:flGagTime;     read_argv( 2, szArg, 31 );         if( !szArg[ 0 ] ) { // No time entered         flGagTime = DEFAULT_TIME;                 formatex( szFlags, 3, "abc" );     } else {         if( is_str_num( szArg ) ) { // Seconds entered             flGagTime = floatstr( szArg );                         if( flGagTime > 86400.0 )                 flGagTime = 86400.0;         } else {             console_print( id, "%L", LANG_PLAYER, "ADMIN_VALUE");                         return PLUGIN_HANDLED;         }                 read_argv( 3, szArg, 31 );                 if( !szArg[ 0 ] ) // No flag entered             formatex( szFlags, 3, "abc" );         else             formatex( szFlags, 3, szArg );     }         new iFlags = read_flags( szFlags );
to:
Code:
    new iFlags = GAG_CHAT|GAG_TEAMSAY|GAG_VOICE;     new Float:flGagTime = DEFAULT_TIME;
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
marcopollo
Member
Join Date: Mar 2011
Old 08-18-2011 , 13:28   Re: amx_gag
Reply With Quote #4

It works tnk a lot, another question, this plugin saves gag's if player is reconnecting or gets out and then enter again, i want to know how this plugin saves, it is by ip or userid?
__________________
marcopollo is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-18-2011 , 14:15   Re: amx_gag
Reply With Quote #5

It saves by SteamID for the whole map, so reconnecting will not dodge the gag.
However, all gags are reset on map change.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
marcopollo
Member
Join Date: Mar 2011
Old 08-18-2011 , 15:09   Re: amx_gag
Reply With Quote #6

Can this be change to saves by ip?
__________________
marcopollo is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 08-18-2011 , 15:17   Re: amx_gag
Reply With Quote #7

SteamID is much more effective. Why would you need IP support?
__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-18-2011 , 15:17   Re: amx_gag
Reply With Quote #8

SteamIDs are more reliable than IPs.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
marcopollo
Member
Join Date: Mar 2011
Old 08-18-2011 , 15:21   Re: amx_gag
Reply With Quote #9

Yes u have right, if i want that the saves function to be removed? If they retry to speak again? Can u do this? tnk
__________________
marcopollo is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-18-2011 , 15:24   Re: amx_gag
Reply With Quote #10

Quote:
Originally Posted by marcopollo View Post
Yes u have right, if i want that the saves function to be removed? If they retry to speak again? Can u do this? tnk
I couldn't understand any of that.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 01:05.


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