Raised This Month: $ Target: $400
 0% 

!rr !gag !ct !t !spec !gag !kick commands


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-04-2021 , 18:08   Re: !rr !gag !ct !t !spec !gag !kick commands
Reply With Quote #2

Quote:
Originally Posted by shaleval1 View Post
Ey, I need some plugin that using chat, for example.
I hope chat and type
!rr - restart the round with text on chat for example "ADMINNAME has restarted the round/game"
!gag - admin has muted NAME for XXX minutes, reason: XXX = Muting a player with minutes and reason.
!ct - admin XXX has transferred XXX to Counter-Terrorist team. = Transfering player to CT
!t - admin XXX has transferred XX to Terrorist team. = Transfering player to T
!spec - admin XXX has transferred XXX to Spectators team. = Transfering player to Spec
!kick - Admin XXX kicked XXX for "reason" = Kicking player.

Ofc using them for example

(ShalevAL is the player's name)

!kick ShalevAL reason
!gag ShalevAL 10 (mins) test (reason)
!t ShalevAL
!ct ShalevAL
!spec ShalevAL

Please help me to find this plugin / make one for me, please!
Fixed:

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <hamsandwich> #define PLUGIN "Commands menu" #define VERSION "1.0" #define AUTHOR "Supremache" #define MenuTitle(%1)  formatex(szTitle,charsmax(szTitle), %1) enum _:eCommandSettings {     iMenuType,     iCommands[32],     iFlags }; new const g_iCommandSettings[][eCommandSettings] = {     /*     * Dont touch this, Commands , Cmd Flags     */     { 1, "kick", ADMIN_ALL},     { 2, "gag" , ADMIN_RCON },     { 3, "t" , ADMIN_RCON },     { 4, "ct" , ADMIN_RCON },     { 5, "spec" , ADMIN_RCON },     { 6, "rr" , ADMIN_RCON } } new szUserName[33][33], g_iPlayerMenu[33] new szTargetID[32]; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_concmd( "Gag", "Gag");     register_clcmd("say", "CommandSay") } public client_authorized(id) {     get_user_name( id, szUserName[id], charsmax(szUserName[])); } public CommandSay(id) {     new szArgs[192]         read_args(szArgs, charsmax(szArgs))     remove_quotes(szArgs)     trim(szArgs)     new szCmd[35]     parse(szArgs, szCmd, charsmax(szCmd))     trim(szCmd)         if (szCmd[0] != '!')         return PLUGIN_CONTINUE         new iMenu = -1         for(new  i = 0; i <= charsmax(g_iCommandSettings); i++)     {         if (equali(szCmd[1], g_iCommandSettings[i][iCommands]))         {             iMenu = g_iCommandSettings[i][iMenuType]                     if (iMenu == -1)                 return PLUGIN_CONTINUE                         g_iPlayerMenu[id] = iMenu             CustomPlayerMenu(id, g_iCommandSettings[i][iFlags])             break;         }     }     return PLUGIN_HANDLED } public CustomPlayerMenu(id, iFlag) {     if(!access(id, iFlag))     {         client_print( id, print_chat, "You dont have access.");         return PLUGIN_HANDLED     }                 new iPlayers[32], iPnum, szUserID[32], szTitle[128], iMenu , szName[64]         switch ( g_iPlayerMenu[id] )     {         case 1: MenuTitle("\yKick Menu:")         case 2: MenuTitle("\yGag Players")         case 3: MenuTitle("\yTransfer: \rTerrorist")         case 4: MenuTitle("\yTransfer: \rCounter-Terrorist")         case 5: MenuTitle("\yTransfer: \rSpectator")         case 6:         {             server_cmd("sv_restartround ^"1^"")             client_print( 0, print_chat, "[ AMXX ] ADMIN: %s restarted the round", szUserName[id]);             return PLUGIN_HANDLED         }     }         iMenu = menu_create(szTitle, "Handler")     get_players(iPlayers, iPnum, "ch");         for(new iPlayer, i; i < iPnum; i++)     {         iPlayer = iPlayers[i]         formatex( szName, charsmax(szName), "%s", szUserName[iPlayer])         formatex( szUserID, charsmax(szUserID), "%d", get_user_userid(iPlayer))         menu_additem(iMenu, szName, szUserID)     }         menu_setprop(iMenu, MPROP_BACKNAME, "Previous page")     menu_setprop(iMenu, MPROP_NEXTNAME, "Next page")     menu_setprop(iMenu, MPROP_EXITNAME, "\rClose")     menu_display(id, iMenu)     return PLUGIN_HANDLED } public Handler(id, iMenu, iItem) {     if(iItem != MENU_EXIT)     {         new iAccess, iCallback, iName[64];         menu_item_getinfo(iMenu, iItem, iAccess, szTargetID, charsmax(szTargetID), iName, charsmax(iName), iCallback);             new iPlayer = str_to_num(szTargetID);                 switch ( g_iPlayerMenu[id] )         {             case 1:             {                 server_cmd("kick #%d ^"kicked by %s^"", iPlayer, szUserName[id] )                 client_print( 0, print_chat, "[ AMXX ] ADMIN: %s Kicked %s", szUserName[id], szUserName[iPlayer] );             }             case 2:             {                 set_hudmessage(255, 255, 85, 0.01, 0.18, 2, 0.5, 6.0, 0.05, 0.05, -1);                 show_hudmessage(id, "Type <minutes>");                                 client_cmd( id, "messagemode Gag" );             }             case 3:             {                   if(is_user_alive(iPlayer)) user_silentkill( iPlayer );                                 cs_set_user_team( iPlayer, CS_TEAM_T );                 ExecuteHamB( Ham_CS_RoundRespawn, iPlayer );                                 client_print( 0, print_chat, "[ AMXX ] ADMIN: %s transfer %s to the terrorist team", szUserName[id], szUserName[iPlayer] );             }             case 4:             {                   if(is_user_alive(iPlayer)) user_silentkill( iPlayer );                                 cs_set_user_team( iPlayer, CS_TEAM_CT );                 ExecuteHamB( Ham_CS_RoundRespawn, iPlayer );                                 client_print( 0, print_chat, "[ AMXX ] ADMIN: %s transfer %s to the counter-terrorist team", szUserName[id], szUserName[iPlayer] );             }             case 5:             {                   if(is_user_alive(iPlayer)) user_silentkill( iPlayer );                                 cs_set_user_team( iPlayer, CS_TEAM_SPECTATOR );                                 client_print( 0, print_chat, "[ AMXX ] ADMIN: %s transfer %s to the spectator", szUserName[id], szUserName[iPlayer] );             }         }     }     menu_destroy(iMenu)     return PLUGIN_HANDLED } public Gag(id) {     new iUserId = str_to_num(szTargetID);     new iTarget = find_player("k", iUserId);         new cGagTime[6], iGagTime         read_argv( 1, cGagTime, charsmax(cGagTime));     iGagTime = str_to_num(cGagTime);               server_cmd("amx_gag ^"#%d^" ^"%d^" ^"Gagged by %s^"", iTarget, iGagTime, szUserName[id])     client_print( 0, print_chat, "[ AMXX ] ADMIN: %s Gagged %s minutes(%d)", szUserName[id], szUserName[iTarget], iGagTime); }
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 06-04-2021 at 21:05.
Supremache 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 19:58.


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