Rejack

First Reactions v0.1b by Rejack

Mar 19th, 2013 (edited)
560
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 17.17 KB | None | 0 0
  1. #include < amxmodx >
  2. #include < cstrike >
  3. #include < engine >
  4. #include < fakemeta >
  5. #include <fakemeta_util>
  6.  
  7. #define Max_Translate 101
  8.  
  9. new fw_engTranslate[ Max_Translate ][ ] =
  10. {
  11.     "quick",    "river",    "phone",    "keyboard", "mouse",
  12.     "glasses",  "windows",  "bottle",   "plate",    "screen",
  13.     "paper",    "newspaper",    "fork",     "knife",    "toilet",
  14.     "news",     "keys",     "open",     "close",    "bed",
  15.     "pillow",   "blanket",  "wall",     "closet",   "dresser",
  16.     "pen",      "pencil",   "money",    "gold",     "disc",
  17.     "banana",   "pear",     "pineapple",    "orange",   "headphones",
  18.     "microphone",   "plum",     "remote",   "batteries",    "clock",
  19.     "time",     "car",      "neck",     "head",     "hand",
  20.     "leg",      "eyes",     "fingers",  "hat",      "shirt",
  21.     "pants",    "book",     "conversation", "shoes",    "nerds",
  22.     "orange",   "purple",   "red",      "pink",     "blue",
  23.     "azure",    "green",    "yellow",   "bible",    "beard",
  24.     "poker",    "page",     "pirates",  "love",     "happy",
  25.     "night",    "day",      "planet",   "plant",    "number",
  26.     "tree",     "one",      "two",      "three",    "four",
  27.     "six",      "seven",    "eight",    "nine",     "ten",
  28.     "eleven",   "twelve",   "shower",   "water",    "circle",
  29.     "square",   "kitchen",  "room",     "floor",    "voice",
  30.     "speakers", "computer", "plug",     "glass",    "net",
  31.     "ball"
  32. }
  33. new fw_hebTranslate[ Max_Translate ][ ] =
  34. {
  35.     "׳–׳™׳¨׳–",  "׳¨׳”׳ ",    "׳Ÿ׳•׳₪׳׳œ׳₪",  "׳×׳“׳œ׳§׳ž",    "׳¨׳‘׳›׳¢",
  36.     "׳׳™׳™׳₪׳§׳©׳ž",  "׳×׳•׳ ׳•׳œ׳—",  "׳§׳•׳‘׳§׳‘",  "׳×׳—׳œ׳¦",    "׳š׳¡׳ž",
  37.     "׳¨׳™׳™׳ ",   "׳Ÿ׳•׳×׳™׳¢",   "׳’׳œ׳–׳ž",   "׳Ÿ׳™׳›׳¡",   "׳”׳œ׳¡׳",
  38.     "׳×׳•׳©׳“׳—",  "׳×׳•׳—׳×׳₪׳ž",  "׳—׳•׳×׳₪׳œ",  "׳¨׳•׳’׳¡׳œ",   "׳”׳˜׳™׳ž",
  39.     "׳×׳™׳¨׳›",   "׳”׳›׳™׳ž׳¡",  "׳¨׳™׳§",    "׳Ÿ׳•׳¨׳",    "׳”׳“׳™׳©",
  40.     "׳˜׳¢",     "׳Ÿ׳•׳¨׳₪׳™׳¢",  "׳£׳¡׳›",    "׳‘׳”׳–",  "׳§׳¡׳™׳“",
  41.     "׳”׳ ׳ ׳‘",   "׳¡׳’׳",    "׳¡׳ ׳ ׳", "׳–׳•׳₪׳×",  "׳×׳•׳™׳ ׳–׳•׳",
  42.     "׳Ÿ׳•׳₪׳•׳¨׳§׳™׳ž","׳£׳™׳–׳©",    "׳˜׳œ׳©", "׳×׳•׳™׳¨׳˜׳‘",  "׳Ÿ׳•׳¢׳©",
  43.     "׳Ÿ׳ž׳–",        "׳•׳˜׳•׳",   "׳¨׳׳•׳•׳¦",   "׳©׳׳¨", "׳“׳™",
  44.     "׳œ׳’׳¨",    "׳׳™׳™׳ ׳™׳¢",  "׳×׳•׳¢׳‘׳¦׳",   "׳¢׳‘׳•׳›",  "׳”׳¦׳œ׳•׳—",
  45.     "׳׳™׳™׳¡׳ ׳›׳ž",  "׳¨׳₪׳¡",    "׳”׳—׳™׳©",  "׳׳™׳™׳œ׳¢׳ ",   "׳׳™׳ ׳•׳ ׳—",
  46.     "׳׳•׳×׳›",   "׳œ׳•׳’׳¡",   "׳׳•׳“׳",   "׳“׳•׳¨׳•",  "׳œ׳•׳—׳›",
  47.     "׳×׳œ׳›׳×",    "׳§׳•׳¨׳™",   "׳‘׳•׳”׳¦",  "׳š''׳ ׳×",   "׳Ÿ׳§׳–",
  48.     "׳¨׳§׳•׳₪",   "׳£׳“",        "׳׳™׳˜׳¨׳™׳₪",  "׳”׳‘׳”׳",  "׳—׳ž׳©",
  49.     "׳”׳œ׳™׳œ",   "׳׳•׳™",   "׳×׳›׳œ ׳‘׳›׳•׳›","׳—׳ž׳¦",   "׳¨׳₪׳¡׳ž",
  50.     "׳¥׳¢",     "׳“׳—׳",   "׳׳™׳™׳×׳©",   "׳©׳•׳œ׳©",    "׳¢׳‘׳¨׳",
  51.     "׳©׳©",     "׳¢׳‘׳©",    "׳”׳ ׳•׳ž׳©",   "׳¢׳©׳×", "׳¨׳©׳¢",
  52.     "׳”׳¨׳©׳¢ ׳“׳—׳", "׳”׳¨׳©׳¢ ׳׳™׳™׳×׳©", "׳×׳—׳œ׳§׳ž", "׳׳™׳ž",   "׳œ׳•׳’׳™׳¢",
  53.     "׳¢׳•׳‘׳™׳¨",  "׳—׳‘׳˜׳ž",   "׳¨׳“׳—",   "׳”׳₪׳¦׳¨",   "׳œ׳•׳§",
  54.     "׳׳™׳œ׳•׳§׳ž׳¨",   "׳‘׳©׳—׳ž",   "׳¢׳§׳©", "׳×׳™׳›׳•׳›׳–",    "׳×׳©׳¨",
  55.     "׳¨׳•׳“׳›"
  56. }
  57. new fw_FirstChars[ ][ ] =
  58. {
  59.     "A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
  60.    
  61.     "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
  62.    
  63.     "U", "V", "W", "X", "Y", "Z",
  64.    
  65.     "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
  66.    
  67.     "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
  68.    
  69.     "u", "v", "w", "x", "y", "z"
  70. };
  71. new fw_FirstNumsNChars[ ][ ] =
  72. {
  73.     "A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
  74.    
  75.     "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
  76.    
  77.     "U", "V", "W", "X", "Y", "Z",
  78.    
  79.     "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
  80.    
  81.     "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
  82.    
  83.     "u", "v", "w", "x", "y", "z",
  84.    
  85.     "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
  86. };
  87. new g_RandomMoves[ 10 ][ ] =
  88. {
  89.     "Jump", "Duck", "Attack", "Attack2", "Use",
  90.     "Reload", "Forward", "Back", "Left", "Right"
  91. }
  92. new g_RandomNums[ ] =
  93. {
  94.     IN_JUMP, IN_DUCK, IN_ATTACK, IN_ATTACK2, IN_USE,
  95.     IN_RELOAD, IN_FORWARD, IN_BACK, IN_MOVELEFT, IN_MOVERIGHT
  96. }
  97.  
  98. new InAct[ 33 ], Act[ 3 ], Ran[ 3 ], bool:o_Combo, bool:o_Translate, bool:o_First, bool:o_Math,
  99. Pick[ 33 ], bool:Move, fwNums[ 3 ], fw_hebChars[ 64 ], fw_engChars[ 64 ], fw_Chars[ 6 ], fwWords[ 128 ],
  100. fwAnswer[ 128 ], fwSign[ 26 ], fwCount;
  101.  
  102. public plugin_init()
  103. {
  104.     register_clcmd( "say /first", "CmdFirst" );
  105.    
  106.     register_clcmd( "say", "CmdSay" );
  107.    
  108.     register_forward( FM_PlayerPreThink, "fwPreThink" );
  109. }
  110.  
  111. public CmdFirst( client )
  112. {
  113.     if ( !( get_user_flags( client ) & ADMIN_KICK ) )   return ColorPrint( client, "You have no access to this command." );
  114.    
  115.     new Menu = menu_create( "First Actions Menu^nBy \rRejack", "SubFirst" );
  116.    
  117.     menu_additem( Menu, "First Writes Event", "0" );
  118.     menu_additem( Menu, "First Translate Event", "1" );
  119.     menu_additem( Menu, "First Math Event", "2" );
  120.     menu_additem( Menu, "First Combo Event^n", "3" );
  121.     menu_additem( Menu, "\rStop Event", "4" );
  122.  
  123.     return menu_display( client, Menu );
  124. }
  125. public SubFirst( client, Menu, Item )
  126. {
  127.     if ( Item == MENU_EXIT )    return menu_destroy( Menu );
  128.    
  129.     if ( o_Combo || o_Translate || o_First || o_Math )  return ColorPrint( client, "You canno't^3 Start^1 and event right now." );
  130.    
  131.     new szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  132.    
  133.     switch ( Item )
  134.     {
  135.         case 4:
  136.         {
  137.             o_Combo = false;
  138.             o_First = false;
  139.             o_Math = false;
  140.             o_Translate = false;
  141.            
  142.             fwCount = 0;
  143.             Move = false;
  144.            
  145.             ColorPrint( 0, "^4%s^1 stopped the current event.", szName );
  146.            
  147.             remove_task( 888 );
  148.            
  149.             return PLUGIN_HANDLED;
  150.         }
  151.     }
  152.    
  153.     Pick[ client ] = Item + 1;
  154.    
  155.     CmdStart( client );
  156.    
  157.     return menu_destroy( Menu );
  158. }
  159.  
  160. public CmdStart( client )
  161. {
  162.     new szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  163.    
  164.     switch ( Pick[ client ] )
  165.     {
  166.         case 1:
  167.         {
  168.             if ( o_Combo || o_Translate || o_First || o_Math )  return ColorPrint( client, "You canno't^3 Start^1 and event right now." );
  169.            
  170.             ColorPrint( 0, "^4%s^1 just started a^3 First^4 Writes^3 Event^1!", szName );
  171.            
  172.             fwWords     = "The first one to write the next combination will be moved to the Guards team automatically^n";
  173.            
  174.             o_First = true;
  175.            
  176.             fwCount = 5;
  177.            
  178.             set_task( 1.0, "Countdown", 999, _,_, "b" );
  179.         }
  180.         case 2:
  181.         {
  182.             if ( o_Combo || o_Translate || o_First || o_Math )  return ColorPrint( client, "You canno't^3 Start^1 and event right now." );
  183.            
  184.             ColorPrint( 0, "^4%s^1 just started a^3 First^4 Translate^3 Event^1!", szName );
  185.            
  186.             fwWords     = "The first on to translate the next words will be move to the Guards team automatically^n";
  187.            
  188.             o_Translate = true;
  189.            
  190.             fwCount = 5;
  191.            
  192.             set_task( 1.0, "Countdown", 999, _,_, "b" );
  193.         }
  194.         case 3:
  195.         {
  196.             if ( o_Combo || o_Translate || o_First || o_Math )  return ColorPrint( client, "You canno't^3 Start^1 and event right now." );
  197.            
  198.             ColorPrint( 0, "^4%s^1 just started a^3 First^4 Math^3 Event^1!", szName );
  199.            
  200.             o_Math  = true;
  201.            
  202.             fwCount = 5;
  203.            
  204.             set_task( 1.0, "Countdown", 999, _,_, "b" );
  205.         }
  206.         case 4:
  207.         {
  208.             if ( o_Combo || o_Translate || o_First || o_Math )  return ColorPrint( client, "You canno't^3 Start^1 and event right now." );
  209.            
  210.             ColorPrint( 0, "^4%s^1 just started a^3 First^4 Combo^3 Event^1!", szName );
  211.            
  212.             o_Combo = true;
  213.            
  214.             fwCount = 5;
  215.            
  216.             set_task( 1.0, "Countdown", 999, _,_, "b" );
  217.         }
  218.  
  219.     }
  220.  
  221.     return PLUGIN_HANDLED;
  222. }
  223.  
  224. public Countdown( )
  225. {
  226.     if ( o_Translate )
  227.     {
  228.         if( fwCount <= 0 )
  229.         {
  230.             Move = true;
  231.            
  232.             fwNums[ 0 ] = random( Max_Translate );
  233.            
  234.             get_heb( fw_hebChars, charsmax( fw_hebChars ) );
  235.            
  236.             get_eng( fw_engChars, charsmax( fw_engChars ) );
  237.            
  238.             set_hudmessage( 0, 160, 0, -1.0, 0.31, 1, 1.0, 8.0 );
  239.            
  240.             show_hudmessage( 0, "^"%s^" %s", fw_hebChars, fwWords );
  241.            
  242.             ColorPrint( 0, "^"^4 %s ^1^"^3 %s", fw_hebChars, fwWords );
  243.            
  244.             remove_task( 999 );
  245.            
  246.             set_task( 20.0, "eventFailed", 999 );
  247.         }
  248.     }
  249.     if ( o_Combo )
  250.     {
  251.         if ( fwCount <= 0 )
  252.         {
  253.             Ran[ 0 ] = random_num( 0,9 );
  254.            
  255.             Ran[ 1 ] = random_num( 0,9 );
  256.            
  257.             Ran[ 2 ] = random_num( 0,9 );
  258.            
  259.            
  260.             Act[ 0 ] = Ran[ 0 ];
  261.            
  262.             Act[ 1 ] = Ran[ 1 ];
  263.            
  264.             Act[ 2 ] = Ran[ 2 ];
  265.            
  266.             Move = true;
  267.            
  268.             remove_task( 999 );
  269.            
  270.             set_task( 20.0, "eventFailed" );
  271.            
  272.             set_hudmessage( 255, 165, 0, -1.0, 0.35, 1, 10.0, 7.0, 0.1, 0.1 )
  273.            
  274.             show_hudmessage( 0, "%s + %s + %s", g_RandomMoves[ Ran[ 0 ] ], g_RandomMoves[ Ran[ 1 ] ], g_RandomMoves[ Ran[ 2 ] ] );
  275.            
  276.             ColorPrint( 0, "%d + %d + %d", Act[ 0 ], Act[ 1 ], Act[ 2 ] );
  277.         }
  278.     }
  279.     if ( o_First )
  280.     {
  281.         if( fwCount <= 0 )
  282.         {
  283.             Move = true;
  284.            
  285.             switch ( random_num( 1, 3 ) )
  286.             {
  287.             case 1: get_chars( fw_Chars, charsmax( fw_Chars ) );
  288.             case 2: get_nums( fw_Chars, charsmax( fw_Chars ) );
  289.             case 3: get_numsNchars( fw_Chars, charsmax( fw_Chars ) );
  290.             }
  291.            
  292.             set_hudmessage( 0, 160, 0, -1.0, 0.31, 1, 1.0, 8.0 );
  293.            
  294.             show_hudmessage( 0, "%s[ %s ]", fwWords, fw_Chars )
  295.            
  296.             ColorPrint( 0, "^3%s^1 ^"^4%s^1^"", fwWords, fw_Chars )
  297.            
  298.             remove_task( 999 );
  299.            
  300.             set_task( 20.0, "eventFailed", 999 );
  301.         }
  302.     }
  303.     if ( o_Math )
  304.     {
  305.         if( fwCount <= 0 )
  306.         {
  307.             Move = true;
  308.    
  309.             fwNums[ 0 ] = random( 350 );
  310.    
  311.             fwNums[ 1 ] = random( 250 );
  312.    
  313.             switch ( random_num( 1, 2 ) )
  314.             {
  315.             case 1:
  316.             {
  317.                 format( fwAnswer, charsmax( fwAnswer ), "%d", fwNums[ 0 ] + fwNums[ 1 ] );
  318.            
  319.                 format( fwSign, charsmax( fwSign ), "+" );
  320.             }
  321.             case 2:
  322.             {
  323.                 format( fwAnswer, charsmax( fwAnswer ), "%d", fwNums[ 0 ] - fwNums[ 1 ] );
  324.                
  325.                 format( fwSign, charsmax( fwSign ), "-" );
  326.             }
  327.             }
  328.    
  329.             set_hudmessage( 0, 160, 0, -1.0, 0.31, 1, 1.0, 8.0 );
  330.            
  331.             show_hudmessage( 0, "Answer the math question!^n%d %s %d = ?", fwNums[ 0 ], fwSign, fwNums[ 1 ] );
  332.            
  333.             ColorPrint( 0, "^3Answer the math question! ^4%d^1 %s^3 %d^1 = ?", fwNums[ 0 ], fwSign, fwNums[ 1 ] );
  334.            
  335.             remove_task( 999 );
  336.            
  337.             set_task( 20.0, "eventFailed", 999 );
  338.         }
  339.     }
  340.     if( fwCount != 0 )
  341.     {
  342.         new Vox[ 32 ]; num_to_word( fwCount, Vox, charsmax( Vox ) );
  343.    
  344.         client_cmd( 0, "spk ^"vox/%s second%s^"", Vox, (fwCount>1)?"s":"" );
  345.    
  346.         switch ( fwCount )
  347.         {
  348.             case 1: set_hudmessage( 0, 255, 255, -1.0, 0.31, 0, 0.1, 0.5 );
  349.            
  350.             case 2: set_hudmessage( 255, 255, 0, -1.0, 0.31, 0, 0.1, 0.5 );
  351.                
  352.             case 3: set_hudmessage( 255, 100, 100, -1.0, 0.31, 0, 0.1, 0.5 );
  353.            
  354.             case 4: set_hudmessage( 255, 0, 0, -1.0, 0.31, 0, 0.1, 0.5 );
  355.                
  356.             case 5: set_hudmessage( 255, 0, 255, -1.0, 0.31, 0, 0.1, 0.5 );
  357.         }
  358.        
  359.         show_hudmessage( 0, "׳×׳•׳™׳ ׳© %d", fwCount );
  360.        
  361.         fwCount -= 1
  362.     }
  363. }  
  364. public CmdSay( client )
  365. {  
  366.     new szMsg[ 192 ], szName[ 32 ];
  367.    
  368.     read_argv( 1, szMsg, charsmax( szMsg ) );
  369.    
  370.     get_user_name( client, szName, sizeof (szName) - 1 );
  371.    
  372.     if ( o_Translate )
  373.     {
  374.         if ( equal( szMsg, fw_engChars ) )
  375.         {
  376.             if ( !Move || cs_get_user_team( client ) == CS_TEAM_CT || !is_user_alive( client ) )    return ColorPrint( client, "You cannot participate in the event." );
  377.            
  378.             ColorPrint( 0, "^4%s^1 won the^3 First Translate Event^1! The answer was^4 %s", szName, fw_engChars );
  379.            
  380.             set_hudmessage( 0, 160, 0, -1.0, 0.31, 1, 1.0, 8.0 );
  381.            
  382.             show_hudmessage( 0, "%s won the First Translate Event! The answer was %s", szName, fw_engChars );
  383.            
  384.             o_Translate = false;
  385.            
  386.             remove_task( 999 );
  387.            
  388.             Move = false;
  389.            
  390.             cs_set_user_team( client, CS_TEAM_CT );
  391.            
  392.             dllfunc( DLLFunc_Spawn, client );
  393.         }
  394.     }
  395.    
  396.     if ( o_First )
  397.     {
  398.         if ( equal( szMsg, fw_Chars ) )
  399.         {
  400.             if ( !Move || cs_get_user_team( client ) == CS_TEAM_CT || !is_user_alive( client ) )    return ColorPrint( client, "You cannot participate in the event." );
  401.            
  402.             set_hudmessage( 0, 160, 0, -1.0, 0.31, 1, 1.0, 8.0 );
  403.            
  404.             show_hudmessage( 0, "%s won the First Writes Event! and was moved to the Guards Team!", szName );
  405.            
  406.             ColorPrint( 0, "^4%s^1 won the^3 Firstwrites Event^1!", szName );
  407.            
  408.             o_First = false;
  409.            
  410.             remove_task( 999 );
  411.            
  412.             Move = false;
  413.            
  414.             cs_set_user_team( client, CS_TEAM_CT );
  415.            
  416.             dllfunc( DLLFunc_Spawn, client );
  417.         }
  418.     }
  419.    
  420.     if ( o_Math )
  421.     {
  422.         if ( equal( szMsg, fwAnswer ) )
  423.         {
  424.             if ( !Move || cs_get_user_team( client ) == CS_TEAM_CT || !is_user_alive( client ) )    return ColorPrint( client, "You cannot participate in the event." );
  425.            
  426.             ColorPrint( 0, "^4%s^1 won the^4 First Math Event^1! The answer was^4 %s", szName, fw_engChars );
  427.            
  428.             set_hudmessage( 0, 160, 0, -1.0, 0.31, 1, 1.0, 8.0 );
  429.            
  430.             show_hudmessage( 0, "%s won the Math Event, The answer was %s", szName, fw_engChars );
  431.            
  432.             o_Math = false;
  433.            
  434.             remove_task( 999 );
  435.            
  436.             Move = false;
  437.            
  438.             cs_set_user_team( client, CS_TEAM_CT );
  439.            
  440.             dllfunc( DLLFunc_Spawn, client );
  441.         }
  442.     }
  443.    
  444.     return PLUGIN_CONTINUE;
  445. }
  446.  
  447. public eventFailed( )
  448. {
  449.    
  450.     o_Combo = false;
  451.     o_First = false;
  452.     o_Math = false;
  453.     o_Translate = false;
  454.    
  455.     fwCount = 0;
  456.     Move = false;
  457.    
  458.     return PLUGIN_HANDLED;
  459. }
  460. /* ----------------------------------------------
  461. Combo
  462. ----------------------------------------------- */
  463. public fwPreThink( client )
  464. {
  465.     if ( cs_get_user_team( client ) == CS_TEAM_CT ) return FMRES_IGNORED;
  466.    
  467.     new g_Button = fm_get_user_button( client );
  468.     new g_Old = fm_get_user_oldbutton( client );
  469.    
  470.     new g_Pressed = g_Button & ~g_Old;
  471.     if ( g_Pressed && o_Combo && Move )
  472.     {
  473.         switch ( InAct[ client ] )
  474.         {
  475.             case 0:
  476.             {
  477.                 if ( g_Pressed & g_RandomNums[ Ran[ 0 ] ] )
  478.                 {
  479.                     InAct[ client ] += 1;
  480.                     ColorPrint( client, "You pressed the^4 right^1 key! ^3[^4Combo Status:^1 %d/3^3]", InAct[ client ] );
  481.                    
  482.                     return FMRES_IGNORED;
  483.                 }
  484.                 ColorPrint( client, "Wrong key! you^4 failed^1!^3 try again^1!" );
  485.                 InAct[ client ] =0;
  486.             }
  487.             case 1:
  488.             {
  489.                 if ( g_Pressed & g_RandomNums[ Ran[ 1 ] ] )
  490.                 {
  491.                     InAct[ client ] += 1;
  492.                     ColorPrint( client, "You pressed the^4 right^1 key! ^3[^4Combo Status:^1 %d/3^3]", InAct[ client ] );
  493.                    
  494.                     return FMRES_IGNORED;
  495.                 }
  496.                 ColorPrint( client, "Wrong key! you^4 failed^1!^3 try again^1!" );
  497.                 InAct[ client ] =0;
  498.             }
  499.             case 2:
  500.             {
  501.                 if ( g_Pressed & g_RandomNums[ Ran[ 2 ] ] )
  502.                 {
  503.                     InAct[ client ] += 1;
  504.                     ColorPrint( client, "You pressed the^4 right^1 key! ^3[^4Combo Status:^1 %d/3^3]", InAct[ client ] );
  505.                    
  506.                     if ( InAct[ client ] == 3 )
  507.                     {
  508.                         ComboWinner( client );
  509.                         return FMRES_IGNORED;
  510.                     }
  511.                     return FMRES_IGNORED;
  512.                 }
  513.                 ColorPrint( client, "Wrong key! you^4 failed^1!^3 try again^1!" );
  514.                 InAct[ client ] =0;
  515.             }
  516.         }
  517.     }
  518.     return FMRES_IGNORED;
  519. }
  520. public ComboWinner( client )
  521. {
  522.     new szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  523.    
  524.     ColorPrint( 0, "^4%s^1 won the^3 First Combo Event^1! ", szName );
  525.    
  526.     set_hudmessage( 0, 160, 0, -1.0, 0.31, 1, 1.0, 8.0 );
  527.    
  528.     show_hudmessage( 0, "%s won the First Combo Event!", szName );
  529.    
  530.     o_Combo = false;
  531.    
  532.     remove_task( 999 );
  533.    
  534.     Move = false;
  535.    
  536.     cs_set_user_team( client, CS_TEAM_CT );
  537.    
  538.     dllfunc( DLLFunc_Spawn, client );
  539.    
  540.     for ( new i; i<get_maxplayers(); i++)
  541.     {
  542.         if ( !is_user_connected( i ) || !is_user_bot( i ) ) return;
  543.        
  544.         InAct[ i ] = 0;
  545.     }
  546. }
  547. /* ----------------------------------------------
  548. STOCKS
  549. ----------------------------------------------- */
  550. stock ColorPrint( const client, const string[], any:... )
  551. {
  552.     new msg[ 191 ], players[ 32 ], count = 1;
  553.    
  554.     static len; len = formatex( msg, charsmax( msg ), "^1[^4 Galactic ^1] " );
  555.    
  556.     vformat( msg[ len ], charsmax( msg ) - len, string, 3 );
  557.    
  558.     if( client )  players[ 0 ] = client;
  559.    
  560.     else    get_players( players,count,"ch" );
  561.    
  562.     for ( new i = 0; i < count; i++ )
  563.     {
  564.         if( is_user_connected( players[ i ] ) )
  565.         {
  566.             message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] );
  567.            
  568.             write_byte( players[ i ] );
  569.            
  570.             write_string( msg );
  571.            
  572.             message_end( );
  573.         }
  574.     }
  575.     return PLUGIN_HANDLED;
  576. }
  577.  
  578. stock get_heb( output[], len ){
  579.     format( output, len, "%s", fw_hebTranslate[ fwNums[ 0 ] ] );}
  580.  
  581. stock get_eng( output[], len ){
  582.     format( output, len, "%s", fw_engTranslate[ fwNums[ 0 ] ] );}
  583.  
  584. stock get_chars( output[], len )
  585. {
  586.     format( output, len, "%s%s%s%s%s%s",
  587.     fw_FirstChars[ random( 52 ) ], fw_FirstChars[ random( 52 ) ],
  588.     fw_FirstChars[ random( 52 ) ], fw_FirstChars[ random( 52 ) ],
  589.     fw_FirstChars[ random( 52 ) ], fw_FirstChars[ random( 52 ) ] );
  590. }
  591.  
  592. stock get_nums( output[], len )
  593. {
  594.     format( output, len, "%d%d%d%d%d%d",
  595.     random( 9 ), random( 9 ), random( 9 ),
  596.     random( 9 ), random( 9 ), random( 9 ) );
  597. }
  598.  
  599. stock get_numsNchars( output[], len )
  600. {
  601.     format( output, len, "%s%s%s%s%s%s",
  602.     fw_FirstNumsNChars[ random( 62 ) ], fw_FirstNumsNChars[ random( 62 ) ],
  603.     fw_FirstNumsNChars[ random( 62 ) ], fw_FirstNumsNChars[ random( 62 ) ],
  604.     fw_FirstNumsNChars[ random( 62 ) ], fw_FirstNumsNChars[ random( 62 ) ] );
  605. }
Add Comment
Please, Sign In to add comment