Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include < amxmodx >
- #include < cstrike >
- #include < engine >
- #include < fakemeta >
- #include <fakemeta_util>
- #include < hamsandwich >
- #include < dhudmessage >
- #define Max_Translate 101
- #define TRANSLATE_ACCESS ADMIN_RESERVATION
- #define g_mTask 1213
- native get_user_cash( client );
- native set_user_cash( plugin, params );
- enum _:g_mTranslateData
- {
- m_mEnglishWord[ 30 ],
- m_mHebrewWord[ 30 ]
- };
- enum _:g_mTranslateData2
- {
- m_mEnglishWord2[ 30 ],
- m_mHebrewWord2[ 30 ]
- };
- new Array:g_aQuestions;
- new Array:g_aQuestions2;
- new g_szFile[ 64 ], g_iQuestion[ g_mTranslateData ], bool:g_bActive, bool:g_bWrite;
- new g_szFile2[ 64 ],g_iQuestion2[ g_mTranslateData2 ], bool:g_bWrite2, bool:g_bActive2;
- new fw_engTranslate[ Max_Translate ][ ] =
- {
- "quick", "river", "phone", "keyboard", "mouse",
- "glasses", "windows", "bottle", "plate", "screen",
- "paper", "newspaper", "fork", "knife", "toilet",
- "news", "keys", "open", "close", "bed",
- "pillow", "blanket", "wall", "closet", "dresser",
- "pen", "pencil", "money", "gold", "disc",
- "banana", "pear", "pineapple", "orange", "headphones",
- "microphone", "plum", "remote", "batteries", "clock",
- "time", "car", "neck", "head", "hand",
- "leg", "eyes", "fingers", "hat", "shirt",
- "pants", "book", "conversation", "shoes", "nerds",
- "orange", "purple", "red", "pink", "blue",
- "azure", "green", "yellow", "bible", "beard",
- "poker", "page", "pirates", "love", "happy",
- "night", "day", "planet", "plant", "number",
- "tree", "one", "two", "three", "four",
- "six", "seven", "eight", "nine", "ten",
- "eleven", "twelve", "shower", "water", "circle",
- "square", "kitchen", "room", "floor", "voice",
- "speakers", "computer", "plug", "glass", "net",
- "ball"
- }
- new fw_hebTranslate[ Max_Translate ][ ] =
- {
- "׳–׳™׳¨׳–", "׳¨׳”׳ ", "׳׳•׳₪׳׳׳₪", "׳×׳“׳׳§׳", "׳¨׳‘׳›׳¢",
- "׳׳™׳™׳₪׳§׳©׳", "׳×׳•׳ ׳•׳׳—", "׳§׳•׳‘׳§׳‘", "׳×׳—׳׳¦", "׳׳¡׳",
- "׳¨׳™׳™׳ ", "׳׳•׳×׳™׳¢", "׳’׳׳–׳", "׳׳™׳›׳¡", "׳”׳׳¡׳",
- "׳×׳•׳©׳“׳—", "׳×׳•׳—׳×׳₪׳", "׳—׳•׳×׳₪׳", "׳¨׳•׳’׳¡׳", "׳”׳˜׳™׳",
- "׳×׳™׳¨׳›", "׳”׳›׳™׳׳¡", "׳¨׳™׳§", "׳׳•׳¨׳", "׳”׳“׳™׳©",
- "׳˜׳¢", "׳׳•׳¨׳₪׳™׳¢", "׳£׳¡׳›", "׳‘׳”׳–", "׳§׳¡׳™׳“",
- "׳”׳ ׳ ׳‘", "׳¡׳’׳", "׳¡׳ ׳ ׳", "׳–׳•׳₪׳×", "׳×׳•׳™׳ ׳–׳•׳",
- "׳׳•׳₪׳•׳¨׳§׳™׳","׳£׳™׳–׳©", "׳˜׳׳©", "׳×׳•׳™׳¨׳˜׳‘", "׳׳•׳¢׳©",
- "׳׳׳–", "׳•׳˜׳•׳", "׳¨׳׳•׳•׳¦", "׳©׳׳¨", "׳“׳™",
- "׳׳’׳¨", "׳׳™׳™׳ ׳™׳¢", "׳×׳•׳¢׳‘׳¦׳", "׳¢׳‘׳•׳›", "׳”׳¦׳׳•׳—",
- "׳׳™׳™׳¡׳ ׳›׳", "׳¨׳₪׳¡", "׳”׳—׳™׳©", "׳׳™׳™׳׳¢׳ ", "׳׳™׳ ׳•׳ ׳—",
- "׳׳•׳×׳›", "׳׳•׳’׳¡", "׳׳•׳“׳", "׳“׳•׳¨׳•", "׳׳•׳—׳›",
- "׳×׳׳›׳×", "׳§׳•׳¨׳™", "׳‘׳•׳”׳¦", "׳''׳ ׳×", "׳׳§׳–",
- "׳¨׳§׳•׳₪", "׳£׳“", "׳׳™׳˜׳¨׳™׳₪", "׳”׳‘׳”׳", "׳—׳׳©",
- "׳”׳׳™׳", "׳׳•׳™", "׳×׳›׳ ׳‘׳›׳•׳›","׳—׳׳¦", "׳¨׳₪׳¡׳",
- "׳¥׳¢", "׳“׳—׳", "׳׳™׳™׳×׳©", "׳©׳•׳׳©", "׳¢׳‘׳¨׳",
- "׳©׳©", "׳¢׳‘׳©", "׳”׳ ׳•׳׳©", "׳¢׳©׳×", "׳¨׳©׳¢",
- "׳”׳¨׳©׳¢ ׳“׳—׳", "׳”׳¨׳©׳¢ ׳׳™׳™׳×׳©", "׳×׳—׳׳§׳", "׳׳™׳", "׳׳•׳’׳™׳¢",
- "׳¢׳•׳‘׳™׳¨", "׳—׳‘׳˜׳", "׳¨׳“׳—", "׳”׳₪׳¦׳¨", "׳׳•׳§",
- "׳׳™׳׳•׳§׳׳¨", "׳‘׳©׳—׳", "׳¢׳§׳©", "׳×׳™׳›׳•׳›׳–", "׳×׳©׳¨",
- "׳¨׳•׳“׳›"
- }
- new fw_FirstChars[ ][ ] =
- {
- "A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
- "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
- "U", "V", "W", "X", "Y", "Z",
- "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
- "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
- "u", "v", "w", "x", "y", "z"
- };
- new fw_FirstNumsNChars[ ][ ] =
- {
- "A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
- "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
- "U", "V", "W", "X", "Y", "Z",
- "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
- "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
- "u", "v", "w", "x", "y", "z",
- "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
- };
- new g_RandomMoves[ 10 ][ ] =
- {
- "Jump", "Duck", "Attack", "Attack2", "Use [ E ]",
- "Reload [ R ]", "Forward", "Back", "Move Left", "Move Right"
- }
- new g_RandomNums[ ] =
- {
- IN_JUMP, IN_DUCK, IN_ATTACK, IN_ATTACK2, IN_USE,
- IN_RELOAD, IN_FORWARD, IN_BACK, IN_MOVELEFT, IN_MOVERIGHT
- }
- new g_RandomType[ 75 ][ ] =
- {
- "Dog", "Puppy", "The", "Gay", "Suck",
- "Titanium", "Eat", "Type", "Pro", "Lolipop",
- "Best", "Pepsi", "Jail", "Luck", "Sit",
- "Have", "Junk", "Bot", "Like", "Slap",
- "Cool", "Shoker", "Close", "Six", "Five",
- "Bad", "Day", "We", "Are", "Trand",
- "Lose", "Gamble", "Won", "Jimi", "Love",
- "Vest", "Gun", "Shirt", "Wife", "Narrator",
- "See", "Look", "Ronit", "Holister", "Roger",
- "Club", "Lazy", "Eye", "Kill", "You",
- "Tell", "Some", "Tea", "Suger", "Coffe",
- "Sex", "Pool", "Snap", "Pussy", "Cat",
- "Dog", "Puppy", "The", "Gay", "Suck",
- "Boy", "Girl", "Mix", "Run", "Hit",
- "And", "Poor", "Jony", "Pin", "Combo"
- }
- new g_RandomTyper[ ] =
- {
- "Dog", "Puppy", "The", "Gay", "Suck",
- "Titanium", "Eat", "Type", "Pro", "Lolipop",
- "Best", "Pepsi", "Jail", "Luck", "Sit",
- "Have", "Junk", "Bot", "Like", "Slap",
- "Cool", "Shoker", "Close", "Six", "Five",
- "Bad", "Day", "We", "Are", "Trand",
- "Lose", "Gamble", "Won", "Jimi", "Love",
- "Vest", "Gun", "Shirt", "Wife", "Narrator",
- "See", "Look", "Ronit", "Holister", "Roger",
- "Club", "Lazy", "Eye", "Kill", "You",
- "Tell", "Some", "Tea", "Suger", "Coffe",
- "Sex", "Pool", "Snap", "Pussy", "Cat",
- "Dog", "Puppy", "The", "Gay", "Suck",
- "Boy", "Girl", "Mix", "Run", "Hit",
- "And", "Poor", "Jony", "Pin", "Combo"
- }
- new InAct[ 33 ], Act[ 6 ], Ran[ 6 ], bool:o_Combo, bool:o_Translate, bool:o_First, bool:o_Math,
- Pick[ 33 ], bool:Move,bool:MoveType,bool:o_Combo2, fwNums[ 3 ], fw_hebChars[ 64 ], fw_engChars[ 64 ], fw_Chars[ 6 ], fwWords[ 128 ],
- fwAnswer[ 128 ], fwSign[ 26 ], fwCount;
- new InAct2[ 33 ], Act2[ 3 ], Ran2[ 3 ]
- new bool:Kill1,bool:WinGlow
- new Killers[100]
- new gCashGet;
- new PickRan
- new TimeStart;
- public plugin_init()
- {
- register_plugin("Random Event", "v1.0", "@,TheBomB`");
- register_clcmd( "say /MenuEvent", "CmdFirst" );
- register_clcmd( "say /stopevent", "EventStopper" );
- register_clcmd( "say", "CmdSay" );
- register_forward( FM_PlayerPreThink, "fwPreThink" );
- CmdLoadQuestions( );
- CmdLoadQuestions2( );
- set_task( 900.0, "ChooseRandomEvent",333, _,_, "b" );
- }
- public ChooseRandomEvent()
- {
- ColorPrint( 0, "^1The auto random ^4event ^1has started ^3!!");
- Killers = "Get 10,000 Cash";
- gCashGet = 10000;
- TimeStart = 10;
- new ran = random_num( 0,5 );
- PickRan = ran + 1;
- Time();
- }
- public Time( )
- {
- if( TimeStart == 0 )
- {
- switch ( PickRan )
- {
- case 1:
- {
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive || g_bActive2 || o_Combo2) return;
- ColorPrint( 0, "^1The Auto Random ^4Event ^1just started a^3 First^4 Writes^3 Event^1!" );
- fwWords = "The first one to write the next words will be^n";
- o_First = true;
- fwCount = 5;
- remove_task( 888 );
- remove_task( 999 );
- set_task( 1.0, "Countdown", 999, _,_, "b" );
- }
- case 2:
- {
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive || g_bActive2 || o_Combo2) return ;
- ColorPrint( 0, "^1The Auto Random ^4Event^1 just started a^3 First^4 Translate^3 Event^1!");
- fwWords = "The first on to translate the next words will be^n";
- o_Translate = true;
- fwCount = 5;
- remove_task( 888 );
- remove_task( 999 );
- set_task( 1.0, "Countdown", 999, _,_, "b" );
- }
- case 3:
- {
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive || g_bActive2 || o_Combo2) return ;
- ColorPrint( 0, "^1The Auto Random ^4Event ^1just started a^3 First^4 Math^3 Event^1!" );
- o_Math = true;
- fwCount = 5;
- remove_task( 888 );
- remove_task( 999 );
- set_task( 1.0, "Countdown", 999, _,_, "b" );
- }
- case 4:
- {
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive || g_bActive2 || o_Combo2) return ;
- ColorPrint( 0, "^1The Auto Random ^4Event ^1just started a^3 First^4 Combo^3 Event^1!" );
- o_Combo = true;
- fwCount = 5;
- remove_task( 888 );
- remove_task( 999 );
- set_task( 1.0, "Countdown", 999, _,_, "b" );
- }
- case 5:
- {
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive || g_bActive2 || o_Combo2 ) return ;
- ColorPrint( 0, "^1The Auto Random ^4Event ^1just started a^3 First^4 Confused Word^3 Event^1!" );
- fwWords = "The first on to fix the next words will be^n";
- g_bActive2 = true;
- fwCount = 5;
- remove_task( 888 );
- remove_task( 999 );
- set_task( 1.0, "Countdown", 999, _,_, "b" );
- }
- case 6:
- {
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive || g_bActive2 || o_Combo2 ) return ;
- ColorPrint( 0, "^1The Auto Random ^4Event ^1just started a^3 First^4 Type Combo^3 Event^1!" );
- o_Combo2 = true;
- fwCount = 5;
- remove_task( 888 );
- remove_task( 999 );
- set_task( 1.0, "Countdown", 999, _,_, "b" );
- }
- }
- }
- else
- {
- new vox[ 22 ];
- num_to_word( TimeStart, vox, 22 );
- client_cmd( 0, "spk ^"sound/countdown/%i^"",TimeStart);
- set_dhudmessage( random( 250 ), random( 250 ), random( 250 ), -1.0, 0.15, 1, 1.0, 0.2 );
- show_dhudmessage( 0, "The Auto Random Event Will Start More: %i", TimeStart );
- TimeStart--;
- set_task( 1.0, "Time" );
- return ;
- }
- }
- public EventStopper( client )
- {
- if (!(get_user_flags(client) & ADMIN_IMMUNITY))
- {
- ColorPrint( client, "You have no ^3access ^1to this command." );
- return 1;
- }
- new szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive || g_bActive2 || o_Combo2)
- {
- o_Combo = false;
- o_First = false;
- o_Math = false;
- o_Translate = false;
- g_bActive = false;
- g_bWrite = false;
- WinGlow = false
- Kill1 = false
- fwCount = 0;
- Move = false;
- fwCount = 0;
- Move = false;
- MoveType = false;
- g_bActive2 = false;
- g_bWrite2 = false;
- o_Combo2 = false;
- ColorPrint( 0, "^4%s^1 stopped the current Events.", szName );
- remove_task( 888 );
- remove_task( 999 );
- }
- }
- public CmdFirst( client )
- {
- if (!(get_user_flags(client) & ADMIN_IMMUNITY))
- {
- ColorPrint( client, "You have no ^3access ^1to this command." );
- return 1;
- }
- new Menu = menu_create( "First Actions Events Menu", "SubFirst" );
- menu_additem( Menu, "First Writes \rEvent", "0" );
- menu_additem( Menu, "First Translate \rEvent", "1" );
- menu_additem( Menu, "First Math \rEvent", "2" );
- menu_additem( Menu, "First Combo \rEvent", "3" );
- menu_additem( Menu, "First Opposite \rEvent", "4" );
- menu_additem( Menu, "First Random Cash \rEvent", "5" );
- menu_additem( Menu, "First Confused Word \rEvent", "6" );
- menu_additem( Menu, "First Type Combo \rEvent^n", "7" );
- menu_additem( Menu, "\rStop Events", "8" );
- return menu_display( client, Menu );
- }
- public SubFirst( client, Menu, Item )
- {
- if ( Item == MENU_EXIT ) return menu_destroy( Menu );
- //if ( o_Combo || o_Translate || o_First || o_Math || g_bActive ) return ColorPrint( client, "You canno't^3 Start^1 and Event right now." );
- new szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
- switch ( Item )
- {
- case 5:
- {
- return client_cmd( client, "say /randomcash" );
- }
- case 8:
- {
- o_Combo = false;
- o_First = false;
- o_Math = false;
- o_Translate = false;
- g_bActive = false;
- g_bWrite = false;
- WinGlow = false
- Kill1 = false
- fwCount = 0;
- Move = false;
- fwCount = 0;
- Move = false;
- MoveType = false;
- g_bActive2 = false;
- g_bWrite2 = false;
- o_Combo2 = false;
- ColorPrint( 0, "^4%s^1 stopped the current Events.", szName );
- remove_task( 888 );
- remove_task( 999 );
- return PLUGIN_HANDLED;
- }
- }
- Pick[ client ] = Item + 1;
- //CmdStart( client );
- KillersMenu( client );
- return menu_destroy( Menu );
- }
- public KillersMenu( client )
- {
- if (!(get_user_flags(client) & ADMIN_IMMUNITY))
- {
- ColorPrint( client, "You have no ^3access ^1to this command." );
- return 1;
- }
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive || g_bActive2 || o_Combo2) return ColorPrint( client, "You canno't^3 Start^1 and Event right now." );
- //if(cs_get_user_team(client) == CS_TEAM_CT)
- //{
- if(is_user_alive(client))
- {
- new Menu22 = menu_create("\w[ \rTitaniums \w]^nEvent Menu", "SubMenu22")
- menu_additem( Menu22, "\wWinner Get 1000 Cash ", "1", 0)
- menu_additem( Menu22, "\wWinner Get 2000 Cash", "2" )
- menu_additem( Menu22, "\wWinner Get 5000 Cash ", "3")
- menu_additem( Menu22, "\wWinner Get 6000 Cash", "4" )
- menu_additem( Menu22, "\wWinner Get 7000 Cash ", "5")
- menu_additem( Menu22, "\wWinner Get 10000 Cash", "6" )
- menu_additem( Menu22, "\wWinner Get 12000 Cash ", "7")
- menu_additem( Menu22, "\wWinner Get 15000 Cash", "8" )
- menu_additem( Menu22, "\wWinner Get 17000 Cash ", "9")
- menu_additem( Menu22, "\wWinner Get 20000 Cash", "10")
- menu_setprop(Menu22, MPROP_EXIT, MEXIT_ALL)
- menu_display(client, Menu22,0)
- }
- //}
- }
- public SubMenu22(client, Menu22, item)
- {
- if( item == MENU_EXIT )
- {
- return PLUGIN_HANDLED
- }
- new Data[6], iName[64], Access, Callback
- menu_item_getinfo(Menu22, item, Access, Data, 5, iName, 63, Callback)
- new Key = str_to_num( Data )
- new challenger[32]
- get_user_name(client, challenger, 31)
- switch( Key )
- {
- case 1:{
- Killers = "Get 1,000 Cash"
- gCashGet = 1000;
- CmdStart( client );
- }
- case 2:{
- Killers = "Get 2,000 Cash"
- gCashGet = 2000;
- CmdStart( client );
- }
- case 3:{
- Killers = "Get 5,000 Cash"
- gCashGet = 5000;
- CmdStart( client );
- }
- case 4:{
- Killers = "Get 6,000 Cash"
- gCashGet = 6000;
- CmdStart( client );
- }
- case 5:{
- Killers = "Get 7,000 Cash"
- gCashGet = 7000;
- CmdStart( client );
- }
- case 6:{
- Killers = "Get 10,000 Cash"
- gCashGet = 10000;
- CmdStart( client );
- }
- case 7:{
- Killers = "Get 12,000 Cash"
- gCashGet = 12000;
- CmdStart( client );
- }
- case 8:{
- Killers = "Get 15,000 Cash"
- gCashGet = 15000;
- CmdStart( client );
- }
- case 9:{
- Killers = "Get 17,000 Cash"
- gCashGet = 17000;
- CmdStart( client );
- }
- case 10:{
- Killers = "Get 20,000 Cash"
- gCashGet = 20000;
- CmdStart( client );
- }
- }
- return PLUGIN_HANDLED;
- }
- public CmdStart( client )
- {
- new szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
- switch ( Pick[ client ] )
- {
- case 1:
- {
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive || g_bActive2 || o_Combo2) return ColorPrint( client, "You canno't^3 Start^1 and Event right now." );
- ColorPrint( 0, "^4%s^1 just started a^3 First^4 Writes^3 Event^1!", szName );
- fwWords = "The first one to write the next words will be^n";
- o_First = true;
- fwCount = 5;
- remove_task( 888 );
- remove_task( 999 );
- set_task( 1.0, "Countdown", 999, _,_, "b" );
- }
- case 2:
- {
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive || g_bActive2 || o_Combo2) return ColorPrint( client, "You canno't^3 Start^1 and Event right now." );
- ColorPrint( 0, "^4%s^1 just started a^3 First^4 Translate^3 Event^1!", szName );
- fwWords = "The first on to translate the next words will be^n";
- o_Translate = true;
- fwCount = 5;
- remove_task( 888 );
- remove_task( 999 );
- set_task( 1.0, "Countdown", 999, _,_, "b" );
- }
- case 3:
- {
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive || g_bActive2 || o_Combo2) return ColorPrint( client, "You canno't^3 Start^1 and Event right now." );
- ColorPrint( 0, "^4%s^1 just started a^3 First^4 Math^3 Event^1!", szName );
- o_Math = true;
- fwCount = 5;
- remove_task( 888 );
- remove_task( 999 );
- set_task( 1.0, "Countdown", 999, _,_, "b" );
- }
- case 4:
- {
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive || g_bActive2 || o_Combo2) return ColorPrint( client, "You canno't^3 Start^1 and Event right now." );
- ColorPrint( 0, "^4%s^1 just started a^3 First^4 Combo^3 Event^1!", szName );
- o_Combo = true;
- fwCount = 5;
- remove_task( 888 );
- remove_task( 999 );
- set_task( 1.0, "Countdown", 999, _,_, "b" );
- }
- case 5:
- {
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive || g_bActive2 || o_Combo2) return ColorPrint( client, "You canno't^3 Start^1 and Event right now." );
- ColorPrint( 0, "^4%s^1 just started a^3 First^4 Opposite^3 Event^1!", szName );
- fwWords = "The first on to opposite the next words will be^n";
- g_bActive = true;
- fwCount = 5;
- remove_task( 888 );
- remove_task( 999 );
- set_task( 1.0, "Countdown", 999, _,_, "b" );
- }
- case 7:
- {
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive || g_bActive2 || o_Combo2 ) return ColorPrint( client, "You canno't^3 Start^1 and Event right now." );
- ColorPrint( 0, "^4%s^1 just started a^3 First^4 Confused Word^3 Event^1!", szName );
- fwWords = "The first on to fix the next words will be^n";
- g_bActive2 = true;
- fwCount = 5;
- remove_task( 888 );
- remove_task( 999 );
- set_task( 1.0, "Countdown", 999, _,_, "b" );
- }
- case 8:
- {
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive || g_bActive2 || o_Combo2 ) return ColorPrint( client, "You canno't^3 Start^1 and Event right now." );
- ColorPrint( 0, "^4%s^1 just started a^3 First^4 Type Combo^3 Event^1!", szName );
- o_Combo2 = true;
- fwCount = 5;
- remove_task( 888 );
- remove_task( 999 );
- set_task( 1.0, "Countdown", 999, _,_, "b" );
- }
- }
- return PLUGIN_HANDLED;
- }
- public Countdown( )
- {
- if ( o_Translate )
- {
- if( fwCount <= 0 )
- {
- Move = true;
- fwNums[ 0 ] = random( Max_Translate );
- get_heb( fw_hebChars, charsmax( fw_hebChars ) );
- get_eng( fw_engChars, charsmax( fw_engChars ) );
- set_hudmessage( 0, 85, 255, -1.0, 0.31, 1, 1.0, 15.0 );
- //show_hudmessage( 0,"%s^n[ %s ]", fwWords ,fw_hebChars );
- show_hudmessage( 0, "%s %s^n[ %s ]", fwWords ,Killers,fw_hebChars )
- ColorPrint( 0, "^"^4 %s ^1^"^3 %s", fw_hebChars, fwWords );
- remove_task( 999 );
- set_task( 20.0, "EventFailed", 999 );
- }
- }
- if ( o_Combo )
- {
- if ( fwCount <= 0 )
- {
- Ran[ 0 ] = random_num( 0,9 );
- Ran[ 1 ] = random_num( 0,9 );
- Ran[ 2 ] = random_num( 0,9 );
- Ran[ 3 ] = random_num( 0,9 );
- Ran[ 4 ] = random_num( 0,9 );
- Ran[ 5 ] = random_num( 0,9 );
- Act[ 0 ] = Ran[ 0 ];
- Act[ 1 ] = Ran[ 1 ];
- Act[ 2 ] = Ran[ 2 ];
- Act[ 3 ] = Ran[ 3 ];
- Act[ 4 ] = Ran[ 4 ];
- Act[ 5 ] = Ran[ 5 ];
- Move = true;
- remove_task( 999 );
- set_task( 20.0, "EventFailed" );
- set_hudmessage( 0, 85, 255, -1.0, 0.35, 1, 10.0, 15.0, 0.1, 0.1 )
- show_hudmessage( 0, "%s^n%s^n%s^n%s^n%s^n%s", g_RandomMoves[ Ran[ 0 ] ], g_RandomMoves[ Ran[ 1 ] ], g_RandomMoves[ Ran[ 2 ] ], g_RandomMoves[ Ran[ 3 ] ], g_RandomMoves[ Ran[ 4 ] ], g_RandomMoves[ Ran[ 5 ] ] );
- ColorPrint( 0, "%s + %s + %s + %s + %s + %s", /*Act[ 0 ], Act[ 1 ], Act[ 2 ], Act[ 3 ], Act[ 4 ], Act[ 5 ]*/g_RandomMoves[ Ran[ 0 ] ], g_RandomMoves[ Ran[ 1 ] ], g_RandomMoves[ Ran[ 2 ] ], g_RandomMoves[ Ran[ 3 ] ], g_RandomMoves[ Ran[ 4 ] ], g_RandomMoves[ Ran[ 5 ] ] );
- }
- }
- if ( o_Combo2 )
- {
- if ( fwCount <= 0 )
- {
- Ran2[ 0 ] = random_num( 0,75 );
- Ran2[ 1 ] = random_num( 0,75 );
- Ran2[ 2 ] = random_num( 0,75 );
- Act2[ 0 ] = Ran2[ 0 ];
- Act2[ 1 ] = Ran2[ 1 ];
- Act2[ 2 ] = Ran2[ 2 ];
- MoveType = true;
- remove_task( 999 );
- set_task( 20.0, "EventFailed", 999 );
- set_hudmessage( 0, 85, 255, -1.0, 0.35, 1, 10.0, 15.0, 0.1, 0.1 )
- show_hudmessage( 0, "%s^n%s^n%s", g_RandomType[ Ran2[ 0 ] ], g_RandomType[ Ran2[ 1 ] ], g_RandomType[ Ran2[ 2 ] ] );
- ColorPrint( 0, "%s + %s + %s",g_RandomType[ Ran2[ 0 ] ], g_RandomType[ Ran2[ 1 ] ], g_RandomType[ Ran2[ 2 ] ] );
- }
- }
- if ( o_First )
- {
- if( fwCount <= 0 )
- {
- Move = true;
- switch ( random_num( 1, 3 ) )
- {
- case 1: get_chars( fw_Chars, charsmax( fw_Chars ) );
- case 2: get_nums( fw_Chars, charsmax( fw_Chars ) );
- case 3: get_numsNchars( fw_Chars, charsmax( fw_Chars ) );
- }
- set_hudmessage( 0, 85, 255, -1.0, 0.31, 1, 1.0, 8.0 );
- show_hudmessage( 0, "%s %s^n[ %s ]", fwWords,Killers, fw_Chars )
- ColorPrint( 0, "^3%s^1 ^"^4%s^1^"", fwWords, fw_Chars )
- remove_task( 999 );
- set_task( 20.0, "EventFailed", 999 );
- }
- }
- if ( o_Math )
- {
- if( fwCount <= 0 )
- {
- Move = true;
- fwNums[ 0 ] = random( 350 );
- fwNums[ 1 ] = random( 250 );
- switch ( random_num( 1, 2 ) )
- {
- case 1:
- {
- format( fwAnswer, charsmax( fwAnswer ), "%d", fwNums[ 0 ] + fwNums[ 1 ] );
- format( fwSign, charsmax( fwSign ), "+" );
- }
- case 2:
- {
- format( fwAnswer, charsmax( fwAnswer ), "%d", fwNums[ 0 ] - fwNums[ 1 ] );
- format( fwSign, charsmax( fwSign ), "-" );
- }
- }
- set_hudmessage( 0, 85, 255, -1.0, 0.31, 1, 1.0, 15.0 );
- show_hudmessage( 0, "Answer the math question!^n%d %s %d = ?^nThe Winner Will Be %s", fwNums[ 0 ], fwSign, fwNums[ 1 ] ,Killers)
- ColorPrint( 0, "^3Answer the math question!^n^n^4%d^1 %s^3 %d^1 = ?", fwNums[ 0 ], fwSign, fwNums[ 1 ] );
- remove_task( 999 );
- set_task( 20.0, "EventFailed", 999 );
- }
- }
- if( g_bActive )
- {
- if( fwCount <= 0 )
- {
- Move = true;
- ArrayGetArray( g_aQuestions, random( ArraySize( g_aQuestions ) ), g_iQuestion );
- set_hudmessage( 0, 85, 255, -1.0, 0.31, 1, 1.0, 8.0 );
- //show_hudmessage( 0,"%s^n[ %s ]", fwWords ,fw_hebChars );
- show_hudmessage( 0, "%s %s^n[ %s ]", fwWords,Killers ,g_iQuestion[ m_mHebrewWord ])
- ColorPrint( 0, "^"^4 %s ^1^"^3 %s", g_iQuestion[ m_mHebrewWord ], fwWords );
- remove_task( 999 );
- g_bWrite = true
- set_task( 20.0, "EventFailed", 999 );
- }
- }
- if( g_bActive2 )
- {
- if( fwCount <= 0 )
- {
- Move = true;
- ArrayGetArray( g_aQuestions2, random( ArraySize( g_aQuestions2 ) ), g_iQuestion2 );
- set_hudmessage( 0, 85, 255, -1.0, 0.31, 1, 1.0, 8.0 );
- //show_hudmessage( 0,"%s^n[ %s ]", fwWords ,fw_hebChars );
- show_hudmessage( 0, "%s %s^n[ %s ]", fwWords,Killers ,g_iQuestion2[ m_mHebrewWord2 ])
- ColorPrint( 0, "^"^4 %s ^1^"^3 %s", g_iQuestion2[ m_mHebrewWord2 ], fwWords );
- remove_task( 999 );
- g_bWrite2 = true
- set_task( 20.0, "EventFailed", 999 );
- }
- }
- if( fwCount != 0 )
- {
- new Vox[ 32 ]; num_to_word( fwCount, Vox, charsmax( Vox ) );
- client_cmd( 0, "spk ^"vox/%s second%s^"", Vox, (fwCount>1)?"s":"" );
- switch ( fwCount )
- {
- case 1: set_hudmessage( 0, 85, 255, -1.0, 0.31, 0, 0.1, 0.5 );
- case 2: set_hudmessage( 0, 85, 255, -1.0, 0.31, 0, 0.1, 0.5 );
- case 3: set_hudmessage( 0, 85, 255, -1.0, 0.31, 0, 0.1, 0.5 );
- case 4: set_hudmessage( 0, 85, 255, -1.0, 0.31, 0, 0.1, 0.5 );
- case 5: set_hudmessage( 0, 85, 255, -1.0, 0.31, 0, 0.1, 0.5 );
- }
- show_hudmessage( 0, "The First Action Will Started More^n%d Seconds^n%s", fwCount,Killers )
- //תוינש
- fwCount -= 1
- }
- }
- public CmdSay( client )
- {
- new szMsg[ 192 ], szName[ 32 ];
- read_argv( 1, szMsg, charsmax( szMsg ) );
- get_user_name( client, szName, sizeof (szName) - 1 );
- if ( o_Translate )
- {
- if ( equal( szMsg, fw_engChars ) )
- {
- if ( !Move ) return ColorPrint( client, "You cannot participate in the Event." );
- ColorPrint( 0, "^4%s^1 won the^3 First Translate Event^1! Won ^4%i ^1Cash ^3!! ^1The answer was^4 %s", szName,gCashGet, fw_engChars );
- set_hudmessage( 0, 85, 255, -1.0, 0.31, 1, 1.0, 8.0 );
- show_hudmessage( 0, "%s won the First Translate Event! Won %i ^1Cash !! The answer was %s", szName,gCashGet, fw_engChars );
- o_Translate = false;
- remove_task( 999 );
- Move = false;
- if( gCashGet == 1000 )
- {
- set_user_cash( client, get_user_cash( client ) + 1000 );
- }
- else if( gCashGet == 2000 )
- {
- set_user_cash( client, get_user_cash( client ) + 2000 );
- }
- else if( gCashGet == 5000 )
- {
- set_user_cash( client, get_user_cash( client ) + 5000 );
- }
- else if( gCashGet == 6000 )
- {
- set_user_cash( client, get_user_cash( client ) + 6000 );
- }
- else if( gCashGet == 7000 )
- {
- set_user_cash( client, get_user_cash( client ) + 7000 );
- }
- else if( gCashGet == 10000 )
- {
- set_user_cash( client, get_user_cash( client ) + 10000 );
- }
- else if( gCashGet == 12000 )
- {
- set_user_cash( client, get_user_cash( client ) + 12000 );
- }
- else if( gCashGet == 15000 )
- {
- set_user_cash( client, get_user_cash( client ) + 15000 );
- }
- else if( gCashGet == 16000 )
- {
- set_user_cash( client, get_user_cash( client ) + 16000 );
- }
- else if( gCashGet == 17000 )
- {
- set_user_cash( client, get_user_cash( client ) + 17000 );
- }
- else if( gCashGet == 20000 )
- {
- set_user_cash( client, get_user_cash( client ) + 20000 );
- }
- }
- }
- if ( o_First )
- {
- if ( equal( szMsg, fw_Chars ) )
- {
- if ( !Move ) return ColorPrint( client, "You cannot participate in the Event." );
- set_hudmessage( 0, 85, 255, -1.0, 0.31, 1, 1.0, 8.0 );
- show_hudmessage( 0, "%s won the First Writes Event! Won %i Cash !!", szName,gCashGet );
- ColorPrint( 0, "^4%s^1 won the^3 Firstwrites Event^1! Won ^4%i ^1Cash ^3!!", szName,gCashGet );
- o_First = false;
- remove_task( 999 );
- Move = false;
- if( gCashGet == 1000 )
- {
- set_user_cash( client, get_user_cash( client ) + 1000 );
- }
- else if( gCashGet == 2000 )
- {
- set_user_cash( client, get_user_cash( client ) + 2000 );
- }
- else if( gCashGet == 5000 )
- {
- set_user_cash( client, get_user_cash( client ) + 5000 );
- }
- else if( gCashGet == 6000 )
- {
- set_user_cash( client, get_user_cash( client ) + 6000 );
- }
- else if( gCashGet == 7000 )
- {
- set_user_cash( client, get_user_cash( client ) + 7000 );
- }
- else if( gCashGet == 10000 )
- {
- set_user_cash( client, get_user_cash( client ) + 10000 );
- }
- else if( gCashGet == 12000 )
- {
- set_user_cash( client, get_user_cash( client ) + 12000 );
- }
- else if( gCashGet == 15000 )
- {
- set_user_cash( client, get_user_cash( client ) + 15000 );
- }
- else if( gCashGet == 16000 )
- {
- set_user_cash( client, get_user_cash( client ) + 16000 );
- }
- else if( gCashGet == 17000 )
- {
- set_user_cash( client, get_user_cash( client ) + 17000 );
- }
- else if( gCashGet == 20000 )
- {
- set_user_cash( client, get_user_cash( client ) + 20000 );
- }
- }
- }
- if ( o_Math )
- {
- if ( equal( szMsg, fwAnswer ) )
- {
- if ( !Move ) return ColorPrint( client, "You cannot participate in the Event." );
- ColorPrint( 0, "^4%s^1 won the^4 First Math Event^1! Won ^4%i ^1Cash ^3!! The answer was^4 %s", szName,gCashGet, fwAnswer );
- set_hudmessage( 0, 85, 255, -1.0, 0.31, 1, 1.0, 8.0 );
- show_hudmessage( 0, "%s won the Math Event ! Won %i Cash !!^n The answer was %s ", szName,gCashGet, fwAnswer );
- o_Math = false;
- remove_task( 999 );
- Move = false;
- if( gCashGet == 1000 )
- {
- set_user_cash( client, get_user_cash( client ) + 1000 );
- }
- else if( gCashGet == 2000 )
- {
- set_user_cash( client, get_user_cash( client ) + 2000 );
- }
- else if( gCashGet == 5000 )
- {
- set_user_cash( client, get_user_cash( client ) + 5000 );
- }
- else if( gCashGet == 6000 )
- {
- set_user_cash( client, get_user_cash( client ) + 6000 );
- }
- else if( gCashGet == 7000 )
- {
- set_user_cash( client, get_user_cash( client ) + 7000 );
- }
- else if( gCashGet == 10000 )
- {
- set_user_cash( client, get_user_cash( client ) + 10000 );
- }
- else if( gCashGet == 12000 )
- {
- set_user_cash( client, get_user_cash( client ) + 12000 );
- }
- else if( gCashGet == 15000 )
- {
- set_user_cash( client, get_user_cash( client ) + 15000 );
- }
- else if( gCashGet == 16000 )
- {
- set_user_cash( client, get_user_cash( client ) + 16000 );
- }
- else if( gCashGet == 17000 )
- {
- set_user_cash( client, get_user_cash( client ) + 17000 );
- }
- else if( gCashGet == 20000 )
- {
- set_user_cash( client, get_user_cash( client ) + 20000 );
- }
- }
- }
- if ( g_bWrite )
- {
- if ( equali( szMsg, g_iQuestion[ m_mEnglishWord ] ) )
- {
- if ( !Move ) return ColorPrint( client, "You cannot participate in the Event." );
- new szName[ 32 ];
- get_user_name( client, szName, charsmax( szName ) );
- set_hudmessage( 0, 85, 255, -1.0, 0.10, 1, 6.0, 5.0 );
- show_hudmessage( 0, "%s Won In The Opposite Contest ! Won %i Cash !! ^nThe Answer is : %s", szName, g_iQuestion[ m_mEnglishWord ] );
- ColorPrint( 0, "^3%s ^1Won ^1In The ^3Opposite ^1Contest ! Won ^4%i ^1Cash ^3!! The Answer is : ^4%s", szName,gCashGet, g_iQuestion[ m_mEnglishWord ] );
- g_bActive = false;
- g_bWrite = false;
- remove_task( 999 );
- if( gCashGet == 1000 )
- {
- set_user_cash( client, get_user_cash( client ) + 1000 );
- }
- else if( gCashGet == 2000 )
- {
- set_user_cash( client, get_user_cash( client ) + 2000 );
- }
- else if( gCashGet == 5000 )
- {
- set_user_cash( client, get_user_cash( client ) + 5000 );
- }
- else if( gCashGet == 6000 )
- {
- set_user_cash( client, get_user_cash( client ) + 6000 );
- }
- else if( gCashGet == 7000 )
- {
- set_user_cash( client, get_user_cash( client ) + 7000 );
- }
- else if( gCashGet == 10000 )
- {
- set_user_cash( client, get_user_cash( client ) + 10000 );
- }
- else if( gCashGet == 12000 )
- {
- set_user_cash( client, get_user_cash( client ) + 12000 );
- }
- else if( gCashGet == 15000 )
- {
- set_user_cash( client, get_user_cash( client ) + 15000 );
- }
- else if( gCashGet == 16000 )
- {
- set_user_cash( client, get_user_cash( client ) + 16000 );
- }
- else if( gCashGet == 17000 )
- {
- set_user_cash( client, get_user_cash( client ) + 17000 );
- }
- else if( gCashGet == 20000 )
- {
- set_user_cash( client, get_user_cash( client ) + 20000 );
- }
- }
- }
- if ( g_bWrite2 )
- {
- if ( equali( szMsg, g_iQuestion2[ m_mEnglishWord2 ] ) )
- {
- if ( !Move ) return ColorPrint( client, "You cannot participate in the Event." );
- new szName[ 32 ];
- get_user_name( client, szName, charsmax( szName ) );
- set_hudmessage( 0, 85, 255, -1.0, 0.10, 1, 6.0, 5.0 );
- show_hudmessage( 0, "%s Won In The Confused Word Contest ! ^nWon %i Cash !!^nThe Answer is : %s", szName,gCashGet, g_iQuestion2[ m_mEnglishWord2 ] );
- ColorPrint( 0, "^3%s ^1Won ^1In The ^3Confused Word ^1Contest ! Won ^4%i ^1Cash ^3!! The Answer is : ^4%s", szName,gCashGet, g_iQuestion2[ m_mEnglishWord2 ] );
- g_bActive2 = false;
- g_bWrite2 = false;
- remove_task( 999 );
- if( gCashGet == 1000 )
- {
- set_user_cash( client, get_user_cash( client ) + 1000 );
- }
- else if( gCashGet == 2000 )
- {
- set_user_cash( client, get_user_cash( client ) + 2000 );
- }
- else if( gCashGet == 5000 )
- {
- set_user_cash( client, get_user_cash( client ) + 5000 );
- }
- else if( gCashGet == 6000 )
- {
- set_user_cash( client, get_user_cash( client ) + 6000 );
- }
- else if( gCashGet == 7000 )
- {
- set_user_cash( client, get_user_cash( client ) + 7000 );
- }
- else if( gCashGet == 10000 )
- {
- set_user_cash( client, get_user_cash( client ) + 10000 );
- }
- else if( gCashGet == 12000 )
- {
- set_user_cash( client, get_user_cash( client ) + 12000 );
- }
- else if( gCashGet == 15000 )
- {
- set_user_cash( client, get_user_cash( client ) + 15000 );
- }
- else if( gCashGet == 16000 )
- {
- set_user_cash( client, get_user_cash( client ) + 16000 );
- }
- else if( gCashGet == 17000 )
- {
- set_user_cash( client, get_user_cash( client ) + 17000 );
- }
- else if( gCashGet == 20000 )
- {
- set_user_cash( client, get_user_cash( client ) + 20000 );
- }
- }
- }
- if ( o_Combo2 && MoveType )
- {
- switch ( InAct2[ client ] )
- {
- case 0:
- {
- if ( equali( szMsg, g_RandomType[ Ran2[ 0 ] ] ) )
- {
- InAct2[ client ] += 1;
- ColorPrint( client, "You enter the^4 right^1 Type word!! ^3[^4Type Combo Status:^1 %d/3^3]", InAct2[ client ] );
- return PLUGIN_CONTINUE;
- }
- ColorPrint( client, "Wrong Word!! you^4 failed^1!^3 try again^1!" );
- InAct2[ client ] =0;
- }
- case 1:
- {
- if ( equali( szMsg, g_RandomType[ Ran2[ 1 ] ] ) )
- {
- InAct2[ client ] += 1;
- ColorPrint( client, "You enter the^4 right^1 Type word! ^3[^4Type Combo Status:^1 %d/3^3]", InAct2[ client ] );
- return PLUGIN_CONTINUE;
- }
- ColorPrint( client, "Wrong Word!! you^4 failed^1!^3 try again^1!" );
- InAct2[ client ] =0;
- }
- case 2:
- {
- if ( equali( szMsg, g_RandomType[ Ran2[ 2 ] ] ) )
- {
- InAct2[ client ] += 1;
- ColorPrint( client, "You enter the^4 right^1 Type word! ^3[^4Type Combo Status:^1 %d/3^3]", InAct2[ client ] );
- if ( InAct2[ client ] == 3 )
- {
- ComboWinner2( client );
- if( gCashGet == 1000 )
- {
- set_user_cash( client, get_user_cash( client ) + 1000 );
- }
- else if( gCashGet == 2000 )
- {
- set_user_cash( client, get_user_cash( client ) + 2000 );
- }
- else if( gCashGet == 5000 )
- {
- set_user_cash( client, get_user_cash( client ) + 5000 );
- }
- else if( gCashGet == 6000 )
- {
- set_user_cash( client, get_user_cash( client ) + 6000 );
- }
- else if( gCashGet == 7000 )
- {
- set_user_cash( client, get_user_cash( client ) + 7000 );
- }
- else if( gCashGet == 10000 )
- {
- set_user_cash( client, get_user_cash( client ) + 10000 );
- }
- else if( gCashGet == 12000 )
- {
- set_user_cash( client, get_user_cash( client ) + 12000 );
- }
- else if( gCashGet == 15000 )
- {
- set_user_cash( client, get_user_cash( client ) + 15000 );
- }
- else if( gCashGet == 16000 )
- {
- set_user_cash( client, get_user_cash( client ) + 16000 );
- }
- else if( gCashGet == 17000 )
- {
- set_user_cash( client, get_user_cash( client ) + 17000 );
- }
- else if( gCashGet == 20000 )
- {
- set_user_cash( client, get_user_cash( client ) + 20000 );
- }
- return PLUGIN_CONTINUE;
- }
- return PLUGIN_CONTINUE;
- }
- ColorPrint( client, "You enter the^4 right^1 Type Word! you^4 failed^1!^3 try again^1!" );
- InAct2[ client ] =0;
- }
- }
- }
- return PLUGIN_CONTINUE;
- }
- public choose_enemy1(id)
- {
- static opcion[64]
- formatex(opcion, charsmax(opcion),"\r[\y Titaniums\r ]\w Choose player")
- new iMenu = menu_create(opcion, "sub_choose_enemy1")
- new players[32], pnum, tempid
- new szName[32], szTempid[10]
- get_players(players, pnum, "a")
- for( new i; i<pnum; i++ )
- {
- tempid = players[i]
- if(cs_get_user_team(tempid) != CS_TEAM_T)
- continue
- get_user_name(tempid, szName, 31)
- num_to_str(tempid, szTempid, 9)
- menu_additem(iMenu, szName, szTempid, 0)
- }
- menu_display(id, iMenu)
- return PLUGIN_HANDLED
- }
- public sub_choose_enemy1(id, menu, item)
- {
- new Data[6], Name[64]
- new Access, Callback
- menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
- new tempid = str_to_num(Data)
- new challenger[32], challenged[32]
- get_user_name(id, challenger, 31)
- get_user_name(tempid, challenged, 31)
- user_kill( tempid )
- ColorPrint(0, "^3%s ^1Has chosed to ^4kill ^3%s",challenger,challenged)
- o_Combo = false;
- o_First = false;
- o_Math = false;
- o_Translate = false;
- g_bActive = false ;
- g_bWrite = false;
- WinGlow = false;
- Kill1 = false;
- fwCount = 0;
- Move = false;
- return PLUGIN_HANDLED;
- }
- public EventFailed( )
- {
- if ( o_Combo || o_Translate || o_First || o_Math || g_bActive2 || o_Combo2)
- {
- o_Combo = false;
- o_Combo2 = false;
- o_First = false;
- o_Math = false;
- o_Translate = false;
- g_bActive = false ;
- g_bActive2 = false ;
- g_bWrite = false;
- g_bWrite2 = false;
- fwCount = 0;
- Move = false;
- MoveType = false;
- ColorPrint(0,"There are ^3no ^1winner, The Events has ^4stopped ^1automaticaly");
- return PLUGIN_HANDLED;
- }
- return PLUGIN_HANDLED;
- }
- /* ----------------------------------------------
- Combo
- ----------------------------------------------- */
- public fwPreThink( client )
- {
- if ( !is_user_alive( client )) return FMRES_IGNORED;
- new g_Button = fm_get_user_button( client );
- new g_Old = fm_get_user_oldbutton( client );
- new g_Pressed = g_Button & ~g_Old;
- if ( g_Pressed && o_Combo && Move )
- {
- switch ( InAct[ client ] )
- {
- case 0:
- {
- if ( g_Pressed & g_RandomNums[ Ran[ 0 ] ] )
- {
- InAct[ client ] += 1;
- ColorPrint( client, "You pressed the^4 right^1 key! ^3[^4Combo Status:^1 %d/6^3]", InAct[ client ] );
- return FMRES_IGNORED;
- }
- ColorPrint( client, "Wrong key! you^4 failed^1!^3 try again^1!" );
- InAct[ client ] =0;
- }
- case 1:
- {
- if ( g_Pressed & g_RandomNums[ Ran[ 1 ] ] )
- {
- InAct[ client ] += 1;
- ColorPrint( client, "You pressed the^4 right^1 key! ^3[^4Combo Status:^1 %d/6^3]", InAct[ client ] );
- return FMRES_IGNORED;
- }
- ColorPrint( client, "Wrong key! you^4 failed^1!^3 try again^1!" );
- InAct[ client ] =0;
- }
- case 2:
- {
- if ( g_Pressed & g_RandomNums[ Ran[ 2 ] ] )
- {
- InAct[ client ] += 1;
- ColorPrint( client, "You pressed the^4 right^1 key! ^3[^4Combo Status:^1 %d/6^3]", InAct[ client ] );
- return FMRES_IGNORED;
- }
- ColorPrint( client, "Wrong key! you^4 failed^1!^3 try again^1!" );
- InAct[ client ] =0;
- }
- case 3:
- {
- if ( g_Pressed & g_RandomNums[ Ran[ 3 ] ] )
- {
- InAct[ client ] += 1;
- ColorPrint( client, "You pressed the^4 right^1 key! ^3[^4Combo Status:^1 %d/6^3]", InAct[ client ] );
- return FMRES_IGNORED;
- }
- ColorPrint( client, "Wrong key! you^4 failed^1!^3 try again^1!" );
- InAct[ client ] =0;
- }
- case 4:
- {
- if ( g_Pressed & g_RandomNums[ Ran[ 4 ] ] )
- {
- InAct[ client ] += 1;
- ColorPrint( client, "You pressed the^4 right^1 key! ^3[^4Combo Status:^1 %d/6^3]", InAct[ client ] );
- return FMRES_IGNORED;
- }
- ColorPrint( client, "Wrong key! you^4 failed^1!^3 try again^1!" );
- InAct[ client ] =0;
- }
- case 5:
- {
- if ( g_Pressed & g_RandomNums[ Ran[ 5 ] ] )
- {
- InAct[ client ] += 1;
- ColorPrint( client, "You pressed the^4 right^1 key! ^3[^4Combo Status:^1 %d/6^3]", InAct[ client ] );
- if ( InAct[ client ] == 6 )
- {
- ComboWinner( client );
- if( gCashGet == 1000 )
- {
- set_user_cash( client, get_user_cash( client ) + 1000 );
- }
- else if( gCashGet == 2000 )
- {
- set_user_cash( client, get_user_cash( client ) + 2000 );
- }
- else if( gCashGet == 5000 )
- {
- set_user_cash( client, get_user_cash( client ) + 5000 );
- }
- else if( gCashGet == 6000 )
- {
- set_user_cash( client, get_user_cash( client ) + 6000 );
- }
- else if( gCashGet == 7000 )
- {
- set_user_cash( client, get_user_cash( client ) + 7000 );
- }
- else if( gCashGet == 10000 )
- {
- set_user_cash( client, get_user_cash( client ) + 10000 );
- }
- else if( gCashGet == 12000 )
- {
- set_user_cash( client, get_user_cash( client ) + 12000 );
- }
- else if( gCashGet == 15000 )
- {
- set_user_cash( client, get_user_cash( client ) + 15000 );
- }
- else if( gCashGet == 16000 )
- {
- set_user_cash( client, get_user_cash( client ) + 16000 );
- }
- else if( gCashGet == 17000 )
- {
- set_user_cash( client, get_user_cash( client ) + 17000 );
- }
- else if( gCashGet == 20000 )
- {
- set_user_cash( client, get_user_cash( client ) + 20000 );
- }
- return FMRES_IGNORED;
- }
- return FMRES_IGNORED;
- }
- ColorPrint( client, "Wrong key! you^4 failed^1!^3 try again^1!" );
- InAct[ client ] =0;
- }
- }
- }
- return FMRES_IGNORED;
- }
- public ComboWinner( client )
- {
- new szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
- ColorPrint( 0, "^4%s^1 won the^3 First Combo Event^1! Won ^4%i ^1Cash ^3!! ", szName,gCashGet );
- set_hudmessage( 0, 160, 0, -1.0, 0.31, 1, 1.0, 8.0 );
- show_hudmessage( 0, "%s won the First Combo Event! Won %i ^1Cash !!", szName,gCashGet );
- o_Combo = false;
- remove_task( 999 );
- Move = false;
- for ( new i; i<get_maxplayers(); i++)
- {
- //if ( !is_user_connected( i ) || !is_user_bot( i ) ) return;
- InAct[ i ] = 0;
- }
- }
- public ComboWinner2( client )
- {
- new szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
- ColorPrint( 0, "^4%s^1 won the^3 First Type Combo Event^1! And Won ^4%i ^1Cash ^3!! ", szName,gCashGet );
- set_hudmessage( 0, 160, 0, -1.0, 0.31, 1, 1.0, 8.0 );
- show_hudmessage( 0, "%s won the First Type Combo Event! Won %i Cash !!", szName,gCashGet);
- o_Combo2 = false;
- remove_task( 999 );
- MoveType = false;
- for ( new i; i<get_maxplayers(); i++)
- {
- //if ( !is_user_connected( i ) || !is_user_bot( i ) ) return;
- InAct2[ i ] = 0;
- }
- }
- /* ----------------------------------------------
- STOCKS
- ----------------------------------------------- */
- stock ColorPrint( const client, const string[], any:... )
- {
- new msg[ 191 ], players[ 32 ], count = 1;
- static len; len = formatex( msg, charsmax( msg ), "^1[^4 Titaniums^1 ] " );
- vformat( msg[ len ], charsmax( msg ) - len, string, 3 );
- if( client ) players[ 0 ] = client;
- else get_players( players,count,"ch" );
- for ( new i = 0; i < count; i++ )
- {
- if( is_user_connected( players[ i ] ) )
- {
- message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] );
- write_byte( players[ i ] );
- write_string( msg );
- message_end( );
- }
- }
- return PLUGIN_HANDLED;
- }
- stock get_heb( output[], len ){
- format( output, len, "%s", fw_hebTranslate[ fwNums[ 0 ] ] );}
- stock get_eng( output[], len ){
- format( output, len, "%s", fw_engTranslate[ fwNums[ 0 ] ] );}
- stock get_chars( output[], len )
- {
- format( output, len, "%s%s%s%s%s%s",
- fw_FirstChars[ random( 52 ) ], fw_FirstChars[ random( 52 ) ],
- fw_FirstChars[ random( 52 ) ], fw_FirstChars[ random( 52 ) ],
- fw_FirstChars[ random( 52 ) ], fw_FirstChars[ random( 52 ) ] );
- }
- stock get_nums( output[], len )
- {
- format( output, len, "%d%d%d%d%d%d",
- random( 9 ), random( 9 ), random( 9 ),
- random( 9 ), random( 9 ), random( 9 ) );
- }
- stock get_numsNchars( output[], len )
- {
- format( output, len, "%s%s%s%s%s%s",
- fw_FirstNumsNChars[ random( 62 ) ], fw_FirstNumsNChars[ random( 62 ) ],
- fw_FirstNumsNChars[ random( 62 ) ], fw_FirstNumsNChars[ random( 62 ) ],
- fw_FirstNumsNChars[ random( 62 ) ], fw_FirstNumsNChars[ random( 62 ) ] );
- }
- stock CmdLoadQuestions( )
- {
- get_configsdir( g_szFile, charsmax( g_szFile ) );
- format( g_szFile, charsmax( g_szFile ), "%s/Translate2.cfg", g_szFile );
- if ( ! file_exists( g_szFile ) )
- {
- write_file( g_szFile, "^"Cold^" ^"Hot^"" );
- write_file( g_szFile, "^"Black^" ^"White^"" );
- write_file( g_szFile, "^"Moon^" ^"Sun^"" );
- write_file( g_szFile, "^"Big^" ^"Small^"" );
- write_file( g_szFile, "^"Tall^" ^"Short^"" );
- write_file( g_szFile, "^"Sad^" ^"Happy^"" );
- write_file( g_szFile, "^"King^" ^"Queen^"" );
- write_file( g_szFile, "^"Stop^" ^"Start^"" );
- write_file( g_szFile, "^"Lose^" ^"Win^"" );
- write_file( g_szFile, "^"Poor^" ^"Rich^"" );
- write_file( g_szFile, "^"Right^" ^"Left^"" );
- write_file( g_szFile, "^"Down^" ^"Up^"" );
- write_file( g_szFile, "^"Yes^" ^"No^"" );
- write_file( g_szFile, "^"Woman^" ^"Man^"" );
- write_file( g_szFile, "^"East^" ^"West^"" );
- write_file( g_szFile, "^"Piss^" ^"Shit^"" );
- write_file( g_szFile, "^"Thin^" ^"Fat^"" );
- write_file( g_szFile, "^"Boy^" ^"Girl^"" );
- write_file( g_szFile, "^"Dead^" ^"Alive^"" );
- write_file( g_szFile, "^"Refused^" ^"Accept^"" );
- write_file( g_szFile, "^"Smart^" ^"Stupid^"" );
- write_file( g_szFile, "^"Easy^" ^"Hard^"" );
- write_file( g_szFile, "^"Nice^" ^"Bad^"" );
- write_file( g_szFile, "^"Slow^" ^"Fast^"" );
- write_file( g_szFile, "^"Full^" ^"Empty^"" );
- write_file( g_szFile, "^"Close^" ^"Far^"" );
- write_file( g_szFile, "^"Ugly^" ^"Beautiful^"" );
- write_file( g_szFile, "^"Clean^" ^"Dirty^"" );
- write_file( g_szFile, "^"Sick^" ^"Healthy^"" );
- write_file( g_szFile, "^"Summer^" ^"Winter^"" );
- write_file( g_szFile, "^"Failed^" ^"Succeed^"" );
- write_file( g_szFile, "^"Last^" ^"First^"" );
- write_file( g_szFile, "^"Animal^" ^"Human^"" );
- write_file( g_szFile, "^"Young^" ^"Old^"" );
- write_file( g_szFile, "^"Wife^" ^"Husband^"" );
- write_file( g_szFile, "^"Wife^" ^"Husband^"" );
- write_file( g_szFile, "^"Gay^" ^"Straight^"" );
- write_file( g_szFile, "^"Hard^" ^"Soft^"" );
- write_file( g_szFile, "^"Buy^" ^"Sell^"" );
- write_file( g_szFile, "^"Safe^" ^"Danger^"" );
- }
- g_aQuestions = ArrayCreate( g_mTranslateData );
- static g_iQuestions[ g_mTranslateData ];
- static iFile;
- iFile = fopen( g_szFile, "rt" );
- static szBuffer[ 70 ];
- while ( ! feof( iFile ) )
- {
- fgets( iFile, szBuffer, charsmax( szBuffer ) );
- trim( szBuffer );
- if ( szBuffer[ 0 ] == ';' || equali( szBuffer, "//", 2 ) || strlen( szBuffer ) < 3 ) continue;
- parse( szBuffer, g_iQuestions[ m_mEnglishWord ], charsmax( g_iQuestions[ m_mEnglishWord ] ), g_iQuestions[ m_mHebrewWord ], charsmax( g_iQuestions[ m_mHebrewWord ] ) );
- remove_quotes( g_iQuestions[ m_mEnglishWord ] );
- remove_quotes( g_iQuestions[ m_mHebrewWord ] );
- ArrayPushArray( g_aQuestions, g_iQuestions );
- }
- log_amx( "Successfuly loaded %i translate questions.", ArraySize( g_aQuestions ) );
- return 1;
- }
- stock CmdLoadQuestions2( )
- {
- get_configsdir( g_szFile2, charsmax( g_szFile2 ) );
- format( g_szFile2, charsmax( g_szFile2 ), "%s/Translate6.cfg", g_szFile2 );
- if ( ! file_exists( g_szFile2 ) )
- {
- write_file( g_szFile2, "^"cat^" ^"tac^"" );
- write_file( g_szFile2, "^"melon^" ^"onmel^"" );
- write_file( g_szFile2, "^"Hotel^" ^"telho^"" );
- write_file( g_szFile2, "^"Wife^" ^"fewi^"" );
- write_file( g_szFile2, "^"Man^" ^"amn^"" );
- write_file( g_szFile2, "^"up^" ^"pu^"" );
- write_file( g_szFile2, "^"down^" ^"wndo^"" );
- write_file( g_szFile2, "^"pee^" ^"eep^"" );
- write_file( g_szFile2, "^"poop^" ^"opop^"" );
- write_file( g_szFile2, "^"gay^" ^"yag^"" );
- write_file( g_szFile2, "^"King^" ^"ngki^"" );
- write_file( g_szFile2, "^"jail^" ^"lija^"" );
- write_file( g_szFile2, "^"poor^" ^"oorp^"" );
- write_file( g_szFile2, "^"clock^" ^"ckclo^"" );
- write_file( g_szFile2, "^"fruit^" ^"fuitr^"" );
- write_file( g_szFile2, "^"food^" ^"fodo^"" );
- write_file( g_szFile2, "^"day^" ^"dya^"" );
- write_file( g_szFile2, "^"people^" ^"eoplep^"" );
- write_file( g_szFile2, "^"new^" ^"wen^"" );
- write_file( g_szFile2, "^"big^" ^"gib^"" );
- write_file( g_szFile2, "^"color^" ^"olorc^"" );
- write_file( g_szFile2, "^"house^" ^"useho^"" );
- write_file( g_szFile2, "^"angry^" ^"gryna^"" );
- write_file( g_szFile2, "^"animal^" ^"anilma^"" );
- write_file( g_szFile2, "^"answer^" ^"ansrew^"" );
- write_file( g_szFile2, "^"ask^" ^"ksa^"" );
- write_file( g_szFile2, "^"alone^" ^"nelao^"" );
- write_file( g_szFile2, "^"away^" ^"ayaw^"" );
- write_file( g_szFile2, "^"back^" ^"ckba^"" );
- write_file( g_szFile2, "^"be^" ^"eb^"" );
- write_file( g_szFile2, "^"at^" ^"ta^"" );
- write_file( g_szFile2, "^"by^" ^"yb^"" );
- write_file( g_szFile2, "^"car^" ^"rac^"" );
- write_file( g_szFile2, "^"do^" ^"od^"" );
- write_file( g_szFile2, "^"eat^" ^"tea^"" );
- write_file( g_szFile2, "^"far^" ^"raf^"" );
- write_file( g_szFile2, "^"fall^" ^"llaf^"" );
- write_file( g_szFile2, "^"go^" ^"og^"" );
- write_file( g_szFile2, "^"get^" ^"teg^"" );
- write_file( g_szFile2, "^"if^" ^"fi^"" );
- write_file( g_szFile2, "^"it^" ^"ti^"" );
- write_file( g_szFile2, "^"is^" ^"si^"" );
- write_file( g_szFile2, "^"see^" ^"ees^"" );
- write_file( g_szFile2, "^"job^" ^"boj^"" );
- write_file( g_szFile2, "^"lie^" ^"eil^"" );
- write_file( g_szFile2, "^"me^" ^"em^"" );
- write_file( g_szFile2, "^"of^" ^"fo^"" );
- write_file( g_szFile2, "^"old^" ^"dlo^"" );
- }
- g_aQuestions2 = ArrayCreate( g_mTranslateData2 );
- static g_iQuestions2[ g_mTranslateData2 ];
- static iFile2;
- iFile2 = fopen( g_szFile2, "rt" );
- static szBuffer2[ 70 ];
- while ( ! feof( iFile2 ) )
- {
- fgets( iFile2, szBuffer2, charsmax( szBuffer2 ) );
- trim( szBuffer2 );
- if ( szBuffer2[ 0 ] == ';' || equali( szBuffer2, "//", 2 ) || strlen( szBuffer2 ) < 3 ) continue;
- parse( szBuffer2, g_iQuestions2[ m_mEnglishWord2 ], charsmax( g_iQuestions2[ m_mEnglishWord2 ] ), g_iQuestions2[ m_mHebrewWord2 ], charsmax( g_iQuestions2[ m_mHebrewWord2 ] ) );
- remove_quotes( g_iQuestions2[ m_mEnglishWord2 ] );
- remove_quotes( g_iQuestions2[ m_mHebrewWord2 ] );
- ArrayPushArray( g_aQuestions2, g_iQuestions2 );
- }
- log_amx( "Successfuly loaded %i translate questions.", ArraySize( g_aQuestions2 ) );
- return 1;
- }
- stock access( const index, const flag )
- {
- return ( get_user_flags( index ) & flag );
- }
- stock get_configsdir( name[ ], len )
- {
- return get_localinfo( "amxx_configsdir", name, len );
- }
Add Comment
Please, Sign In to add comment