SHARE
TWEET

Untitled

a guest Mar 25th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. YCMD:buydrink(playerid, params[], help) {
  2.         if(new x_nr[56]; //aici imi da problema linia
  3.         str[128];
  4.         if(PlayerToPoint(8.0, playerid, 1218.7245,-1426.3439,13.3549))
  5.         if(sscanf(params, "s[50]",x_nr)) {
  6.             SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/buydrink <Drink name>");
  7.             SCM(playerid, COLOR_WHITE, "Alcohol: Beer (1,000$), Wine (1,500$), Vodka(3,000$), Whiskey(5,000$)");
  8.             SCM(playerid, COLOR_WHITE, "Refreshments: Water (20$), Soda (50$), Sprunk(200$), Coffee (500$)");
  9.             return 1;
  10.         }
  11.         if(strcmp(x_nr,"beer",true) == 0) {
  12.             if(GetPlayerCash(playerid) < 1000) return SCM(playerid,COLOR_WHITE,"Nu ai bani destui.");
  13.             GivePlayerCash(playerid, - 1000);
  14.             PlayerDrunk[playerid] += 1;
  15.             SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
  16.             for(new m; m < 2; m++) {
  17.                 if(PlayerInfo[playerid][pDailyMission][m] == 10) CheckMission(playerid, m);
  18.             }
  19.         }
  20.         else if(strcmp(x_nr,"vodka",true) == 0) {
  21.             if(GetPlayerCash(playerid) < 3000) return SCM(playerid,COLOR_WHITE,"Nu ai bani destui.");
  22.             GivePlayerCash(playerid, - 3000);
  23.             PlayerDrunk[playerid] += 2;
  24.             SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_WINE);
  25.             for(new m; m < 2; m++) {
  26.                 if(PlayerInfo[playerid][pDailyMission][m] == 10) CheckMission(playerid, m);
  27.             }
  28.         }
  29.         else if(strcmp(x_nr,"whiskey",true) == 0) {
  30.             if(GetPlayerCash(playerid) < 5000) return SCM(playerid,COLOR_WHITE,"Nu ai bani destui.");
  31.             GivePlayerCash(playerid, - 5000);
  32.             PlayerDrunk[playerid] += 3;
  33.             SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_WINE);
  34.             for(new m; m < 2; m++) {
  35.                 if(PlayerInfo[playerid][pDailyMission][m] == 10) CheckMission(playerid, m);
  36.             }
  37.         }
  38.         else if(strcmp(x_nr,"wine",true) == 0) {
  39.             if(GetPlayerCash(playerid) < 1500) return SCM(playerid,COLOR_WHITE,"Nu ai bani destui.");
  40.             GivePlayerCash(playerid, - 1500);
  41.             PlayerDrunk[playerid] += 3;
  42.             SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_WINE);
  43.             for(new m; m < 2; m++) {
  44.                 if(PlayerInfo[playerid][pDailyMission][m] == 10) CheckMission(playerid, m);
  45.             }
  46.         }
  47.         else if(strcmp(x_nr,"water",true) == 0) {
  48.             if(GetPlayerCash(playerid) < 20) return SCM(playerid,COLOR_WHITE,"Nu ai bani destui.");
  49.             GivePlayerCash(playerid, - 20);
  50.             SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_SPRUNK);
  51.         }
  52.         else if(strcmp(x_nr,"soda",true) == 0) {
  53.             if(GetPlayerCash(playerid) < 50) return SCM(playerid,COLOR_WHITE,"Nu ai bani destui.");
  54.             GivePlayerCash(playerid, - 50);
  55.             SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_SPRUNK);
  56.             for(new m; m < 2; m++) {
  57.                 if(PlayerInfo[playerid][pDailyMission][m] == 10) CheckMission(playerid, m);
  58.             }
  59.         }
  60.         else if(strcmp(x_nr,"sprunk",true) == 0) {
  61.             if(GetPlayerCash(playerid) < 200) return SCM(playerid,COLOR_WHITE,"Nu ai bani destui.");
  62.             GivePlayerCash(playerid, - 200);
  63.             SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_SPRUNK);
  64.         }
  65.         else if(strcmp(x_nr,"coffee",true) == 0) {
  66.             if(GetPlayerCash(playerid) < 500) return SCM(playerid,COLOR_WHITE,"Nu ai bani destui.");
  67.             GivePlayerCash(playerid, - 500);
  68.             SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_SPRUNK);
  69.             for(new m; m < 2; m++) {
  70.                 if(PlayerInfo[playerid][pDailyMission][m] == 14) CheckMission(playerid, m);
  71.             }
  72.         }
  73.         else return  SCM(playerid, COLOR_WHITE, "Barman: Nu avem aceasta bautura!");
  74.  
  75.         new string[70];
  76.         format(string, sizeof(string), "* %s bea %s.", GetName(playerid) ,x_nr);
  77.         ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  78.     }
  79.     else SCM(playerid, COLOR_GREY, "Nu esti la bar.");
  80.     return 1;
  81. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top