Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #define PLUGIN "Scan_Say"
- #define VERSION "12/May/2020"
- #define AUTHOR "General Memer"
- new Float:g_fCooldown[33];
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_clcmd("say", "fwSayHandle");
- }
- public client_connect(iClient)
- {
- g_fCooldown[iClient] = 0.0;
- }
- public client_disconnected(iClient)
- {
- g_fCooldown[iClient] = 0.0;
- }
- public fwSayHandle(const iClient)
- {
- new sArg[194];
- read_args( sArg, charsmax(sArg) );
- remove_quotes(sArg);
- new sCmd[32];
- argbreak( sArg, sCmd, charsmax(sCmd), sArg, charsmax(sArg) );
- if( equali(sCmd, "/scan") )
- {
- static Float:fGametime;
- fGametime = get_gametime();
- if( g_fCooldown[iClient] > fGametime )
- return PLUGIN_HANDLED;
- if( sArg[0] )
- {
- new sName[32];
- get_user_name( iClient, sName, charsmax(sName) );
- new iPlayers[32], iPnum;
- get_players(iPlayers, iPnum;
- for(new i, iPlayer; i < iPnum; i++)
- {
- iPlayer = iPlayers[i];
- if( get_user_flags(iPlayer) & ADMIN_CHAT )
- {
- client_print_color(iPlayer, print_team_default, "^4[PSL] A Scan From (%s)^1: '%s'", sName, sArg);
- }
- }
- client_print_color(iClient, print_team_default, "^4[PSL] ^3Your message has been sent.");
- }
- g_fCooldown[iClient] = fGametime + 2.0;
- return PLUGIN_HANDLED;
- }
- return PLUGIN_CONTINUE;
- }
Add Comment
Please, Sign In to add comment