Guest User

Untitled

a guest
Jun 3rd, 2017
345
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ChenChen143's Bar Betting Filterscript
  2. #define COLOR_WHITE 0xFFFFFFFF
  3.  
  4. #include <a_samp>
  5. #include <zcmd>
  6. #include <sscanf2>
  7.  
  8. #if defined FILTERSCRIPT
  9.  
  10. public OnFilterScriptInit()
  11. {
  12.     print("\n--------------------------------------");
  13.     print(" Bar Bet Script by ChenChen143");
  14.     print("--------------------------------------\n");
  15.     return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20.     return 1;
  21. }
  22.  
  23. #else
  24.  
  25. #endif
  26.  
  27. COMMAND:barbets(playerid, params[])
  28. {
  29.     new message[100];
  30.     new selection[25];
  31.  
  32.     if(sscanf(params, "s[20]", message))
  33.     {
  34.         SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SYNTAX] {FFFFFF}Usage: \"barbets <bet-name>\"");
  35.         SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SYNTAX] {FFFFFF}Bet Names: GrapeDrank($2,500), OrangeJuice($5,000), AppleJuice($10,000)");
  36.         SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SYNTAX] {FFFFFF}Bet Names: Coke($25,000), Pepsi($50,000), LightBeer($100,000), Beer($250,000)");
  37.         SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SYNTAX] {FFFFFF}Bet Names: RedWine($600,000), Champagne($1,200,000), Water($2,600,000)");
  38.         SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SYNTAX] {FFFFFF}Bet Names: Lemonade($4,100,000), Milkshake($8,700,000), Zonrox($13,000,000)");
  39.         SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SYNTAX] {FFFFFF}Bet Names: Domex($50,000,000), PepperDrink($75,000,000), Bleach($100,000,000)");
  40.         SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SYNTAX] {FFFFFF}Note: You will buy the drink, if you win, you get double the prize of the drink,");
  41.         SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SYNTAX] {FFFFFF}Note: If you lose, you get nothing. EXAMPLE: You bought PEPSI(50k) and you won,");
  42.         SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SYNTAX] {FFFFFF}Note: You get 100k.");
  43.     }
  44.     else if(!strcmp(selection, "GrapeDrank", true))
  45.     {
  46.         new winchance = random(6);
  47.         switch(winchance)
  48.         {
  49.             case 0, 1, 2:
  50.             {
  51.                 GivePlayerMoney(playerid, 2500);
  52.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $5,000 from a bar bet!");
  53.             }
  54.             case 3, 4, 5:
  55.             {
  56.                 GivePlayerMoney(playerid, -2500);
  57.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, better luck next time!");
  58.             }
  59.         }
  60.     }
  61.     else if(!strcmp(selection, "OrangeJuice", true))
  62.     {
  63.         new winchance = random(6);
  64.         switch(winchance)
  65.         {
  66.             case 0, 1, 2:
  67.             {
  68.                 GivePlayerMoney(playerid, 5000);
  69.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $10,000 from a bar bet!");
  70.             }
  71.             case 3, 4, 5:
  72.             {
  73.                 GivePlayerMoney(playerid, -5000);
  74.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, better luck next time!");
  75.             }
  76.         }
  77.     }
  78.     else if(!strcmp(selection, "AppleJuice", true))
  79.     {
  80.         new winchance = random(6);
  81.         switch(winchance)
  82.         {
  83.             case 0, 1, 2:
  84.             {
  85.                 GivePlayerMoney(playerid, 10000);
  86.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $20,000 from a bar bet!");
  87.             }
  88.             case 3, 4, 5:
  89.             {
  90.                 GivePlayerMoney(playerid, -10000);
  91.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, better luck next time!");
  92.             }
  93.         }
  94.     }
  95.     else if(!strcmp(selection, "Coke", true))
  96.     {
  97.         new winchance = random(6);
  98.         switch(winchance)
  99.         {
  100.             case 0, 1, 2:
  101.             {
  102.                 GivePlayerMoney(playerid, 25000);
  103.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $50,000 from a bar bet!");
  104.             }
  105.             case 3, 4, 5:
  106.             {
  107.                 GivePlayerMoney(playerid, -25000);
  108.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, better luck next time!");
  109.             }
  110.         }
  111.     }
  112.     else if(!strcmp(selection, "Pepsi", true))
  113.     {
  114.         new winchance = random(6);
  115.         switch(winchance)
  116.         {
  117.             case 0, 1, 2:
  118.             {
  119.                 GivePlayerMoney(playerid, 50000);
  120.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $100,000 from a bar bet!");
  121.             }
  122.             case 3, 4, 5:
  123.             {
  124.                 GivePlayerMoney(playerid, -50000);
  125.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, better luck next time!");
  126.             }
  127.         }
  128.     }
  129.     else if(!strcmp(selection, "LightBeer", true))
  130.     {
  131.         new winchance = random(6);
  132.         switch(winchance)
  133.         {
  134.             case 0, 1, 2:
  135.             {
  136.                 GivePlayerMoney(playerid, 100000);
  137.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $200,000 from a bar bet!");
  138.             }
  139.             case 3, 4, 5:
  140.             {
  141.                 GivePlayerMoney(playerid, -100000);
  142.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, better luck next time!");
  143.             }
  144.         }
  145.     }
  146.     else if(!strcmp(selection, "Beer", true))
  147.     {
  148.         new winchance = random(6);
  149.         switch(winchance)
  150.         {
  151.             case 0, 1, 2:
  152.             {
  153.                 GivePlayerMoney(playerid, 250000);
  154.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $500,000 from a bar bet!");
  155.                 new name[MAX_PLAYER_NAME];
  156.                 new string[100];
  157.                 GetPlayerName(playerid, name, sizeof(name));
  158.                 format(message, sizeof(message), "{FF0000}[BROADCAST] {00FF04}%s Has Just Won $500,000 from a bar bet!",name);
  159.                 SendClientMessageToAll(COLOR_WHITE, string);
  160.             }
  161.             case 3, 4, 5:
  162.             {
  163.                 GivePlayerMoney(playerid, -250000);
  164.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, better luck next time!");
  165.             }
  166.         }
  167.     }
  168.     else if(!strcmp(selection, "RedWine", true))
  169.     {
  170.         new winchance = random(6);
  171.         switch(winchance)
  172.         {
  173.             case 0, 1, 2:
  174.             {
  175.                 GivePlayerMoney(playerid, 600000);
  176.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $1,200,000 from a bar bet!");
  177.                 new name[MAX_PLAYER_NAME];
  178.                 new string[100];
  179.                 GetPlayerName(playerid, name, sizeof(name));
  180.                 format(message, sizeof(message), "{FF0000}[BROADCAST] {00FF04}%s Has Just Won $1,200,000 from a bar bet!",name);
  181.                 SendClientMessageToAll(COLOR_WHITE, string);
  182.             }
  183.             case 3, 4, 5:
  184.             {
  185.                 GivePlayerMoney(playerid, -600000);
  186.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, better luck next time!");
  187.             }
  188.         }
  189.     }
  190.     else if(!strcmp(selection, "Champagne", true))
  191.     {
  192.         new winchance = random(6);
  193.         switch(winchance)
  194.         {
  195.             case 0, 1, 2:
  196.             {
  197.                 GivePlayerMoney(playerid, 1200000);
  198.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $2,400,000 from a bar bet!");
  199.                 new name[MAX_PLAYER_NAME];
  200.                 new string[100];
  201.                 GetPlayerName(playerid, name, sizeof(name));
  202.                 format(message, sizeof(message), "{FF0000}[BROADCAST] {00FF04}%s Has Just Won $2,400,000 from a bar bet!",name);
  203.                 SendClientMessageToAll(COLOR_WHITE, string);
  204.             }
  205.             case 3, 4, 5:
  206.             {
  207.                 GivePlayerMoney(playerid, -1200000);
  208.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, better luck next time!");
  209.             }
  210.         }
  211.     }
  212.     else if(!strcmp(selection, "Water", true))
  213.     {
  214.         new winchance = random(6);
  215.         switch(winchance)
  216.         {
  217.             case 0, 1, 2:
  218.             {
  219.                 GivePlayerMoney(playerid, 2600000);
  220.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $5,200,000 from a bar bet!");
  221.                 new name[MAX_PLAYER_NAME];
  222.                 new string[100];
  223.                 GetPlayerName(playerid, name, sizeof(name));
  224.                 format(message, sizeof(message), "{FF0000}[BROADCAST] {00FF04}%s Has Just Won $5,200,000 from a bar bet!",name);
  225.                 SendClientMessageToAll(COLOR_WHITE, string);
  226.             }
  227.             case 3, 4, 5:
  228.             {
  229.                 GivePlayerMoney(playerid, -2600000);
  230.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, better luck next time!");
  231.             }
  232.         }
  233.     }
  234.     else if(!strcmp(selection, "Lemonade", true))
  235.     {
  236.         new winchance = random(6);
  237.         switch(winchance)
  238.         {
  239.             case 0, 1, 2:
  240.             {
  241.                 GivePlayerMoney(playerid, 4100000);
  242.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $8,200,000 from a bar bet!");
  243.                 new name[MAX_PLAYER_NAME];
  244.                 new string[100];
  245.                 GetPlayerName(playerid, name, sizeof(name));
  246.                 format(message, sizeof(message), "{FF0000}[BROADCAST] {00FF04}%s Has Just Won $8,200,000 from a bar bet!",name);
  247.                 SendClientMessageToAll(COLOR_WHITE, string);
  248.             }
  249.             case 3, 4, 5:
  250.             {
  251.                 GivePlayerMoney(playerid, -4100000);
  252.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, better luck next time!");
  253.             }
  254.         }
  255.     }
  256.     else if(!strcmp(selection, "Milkshake", true))
  257.     {
  258.         new winchance = random(6);
  259.         switch(winchance)
  260.         {
  261.             case 0, 1, 2:
  262.             {
  263.                 GivePlayerMoney(playerid, 8700000);
  264.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $17,400,000 from a bar bet!");
  265.                 new name[MAX_PLAYER_NAME];
  266.                 new string[100];
  267.                 GetPlayerName(playerid, name, sizeof(name));
  268.                 format(message, sizeof(message), "{FF0000}[BROADCAST] {00FF04}%s Has Just Won $17,400,000 from a bar bet!",name);
  269.                 SendClientMessageToAll(COLOR_WHITE, string);
  270.             }
  271.             case 3, 4, 5:
  272.             {
  273.                 GivePlayerMoney(playerid, -8700000);
  274.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, better luck next time!");
  275.             }
  276.         }
  277.     }
  278.     else if(!strcmp(selection, "Zonrox", true))
  279.     {
  280.         new winchance = random(6);
  281.         switch(winchance)
  282.         {
  283.             case 0, 1, 2:
  284.             {
  285.                 GivePlayerMoney(playerid, 13000000);
  286.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $26,000,000 from a bar bet!");
  287.                 new name[MAX_PLAYER_NAME];
  288.                 new string[100];
  289.                 GetPlayerName(playerid, name, sizeof(name));
  290.                 format(message, sizeof(message), "{FF0000}[BROADCAST] {00FF04}%s Has Just Won $26,000,000 from a bar bet!",name);
  291.                 SendClientMessageToAll(COLOR_WHITE, string);
  292.             }
  293.             case 3, 4, 5:
  294.             {
  295.                 GivePlayerMoney(playerid, -13000000);
  296.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, better luck next time!");
  297.             }
  298.         }
  299.     }
  300.     else if(!strcmp(selection, "PepperDrink", true))
  301.     {
  302.         new winchance = random(6);
  303.         switch(winchance)
  304.         {
  305.             case 0, 1, 2:
  306.             {
  307.                 GivePlayerMoney(playerid, 75000000);
  308.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $150,000,000 from a bar bet!");
  309.                 new name[MAX_PLAYER_NAME];
  310.                 new string[100];
  311.                 GetPlayerName(playerid, name, sizeof(name));
  312.                 format(message, sizeof(message), "{FF0000}[BROADCAST] {00FF04}%s Has Just Won $150,000,000 from a bar bet!",name);
  313.                 SendClientMessageToAll(COLOR_WHITE, string);
  314.             }
  315.             case 3, 4, 5:
  316.             {
  317.                 GivePlayerMoney(playerid, -75000000);
  318.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, better luck next time!");
  319.             }
  320.         }
  321.     }
  322.     else if(!strcmp(selection, "Domex", true))
  323.     {
  324.         new winchance = random(6);
  325.         switch(winchance)
  326.         {
  327.             case 0, 1, 2:
  328.             {
  329.                 GivePlayerMoney(playerid, 50000000);
  330.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $100,000,000 from a bar bet!");
  331.                 new name[MAX_PLAYER_NAME];
  332.                 new string[100];
  333.                 GetPlayerName(playerid, name, sizeof(name));
  334.                 format(message, sizeof(message), "{FF0000}[BROADCAST] {00FF04}%s Has Just Won $100,000,000 from a bar bet!",name);
  335.                 SendClientMessageToAll(COLOR_WHITE, string);
  336.             }
  337.             case 3, 4, 5:
  338.             {
  339.                 GivePlayerMoney(playerid, -50000000);
  340.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, better luck next time!");
  341.             }
  342.         }
  343.     }
  344.     else if(!strcmp(selection, "Bleach", true))
  345.     {
  346.         new winchance = random(6);
  347.         switch(winchance)
  348.         {
  349.             case 0, 1, 2:
  350.             {
  351.                 GivePlayerMoney(playerid, 100000000);
  352.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You have won $200,000,000 from a bar bet!");
  353.                 new name[MAX_PLAYER_NAME];
  354.                 new string[100];
  355.                 GetPlayerName(playerid, name, sizeof(name));
  356.                 format(message, sizeof(message), "{FF0000}[BROADCAST] {00FF04}%s Has Just Won $200,000,000 from a bar bet!",name);
  357.                 SendClientMessageToAll(COLOR_WHITE, string);
  358.             }
  359.             case 3, 4, 5:
  360.             {
  361.                 GivePlayerMoney(playerid, -100000000);
  362.                 SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[BARBETS] {FFFFFF}You lost, Say GoodBye To your 100m!");
  363.             }
  364.         }
  365.     }
  366.     return 1;
  367. }
RAW Paste Data Copied