SHARE
TWEET

Untitled

a guest May 26th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CMD:usedrugs(playerid, params[])
  2. {
  3.     if(pInfo[playerid][pDrugs] == 0) return SCM(playerid, COLOR_RED, "[Ошибка] {FFFFFF}У Вас нету наркотиков!");
  4.     else if(sscanf(params, "d", params[0])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /usedrugs [кол-во дозы]");
  5.     else if(!(1 <= params[0] <= 30)) return SendClientMessage(playerid, COLOR_RED,  "[Ошибка] {FFFFFF}Употреблять можно от 1 до 30 грам!");
  6.     else if(GetPVarInt(playerid, "DrugsTime") > gettime()) return SCM(playerid, COLOR_RED, "[Ошибка] {FFFFFF}Употреблять наркотики можно раз в минуту!");
  7.     else if(IsPlayerInAnyVehicle(playerid)) ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,0,0,0,0,0,1);
  8.     else ApplyAnimation(playerid,"SMOKING","M_smk_drag",4.1,0,0,0,0,0,1);
  9.     if(params[0] == 1) { SetHealth(playerid, 10); pInfo[playerid][pDrugAddict] += 1; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); }
  10.     else if(params[0] == 2) { SetHealth(playerid, 20); pInfo[playerid][pDrugAddict] += 2; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); }
  11.     else if(params[0] == 3) { SetHealth(playerid, 30); pInfo[playerid][pDrugAddict] += 3; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); }
  12.     else if(params[0] == 4) { SetHealth(playerid, 40); pInfo[playerid][pDrugAddict] += 4; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); }
  13.     else if(params[0] == 5) { SetHealth(playerid, 50); pInfo[playerid][pDrugAddict] += 5; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); }
  14.     else if(params[0] == 6) { SetHealth(playerid, 60); pInfo[playerid][pDrugAddict] += 6; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); }
  15.     else if(params[0] == 7) { SetHealth(playerid, 70); pInfo[playerid][pDrugAddict] += 7; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); }
  16.     else if(params[0] == 8) { SetHealth(playerid, 80); pInfo[playerid][pDrugAddict] += 8; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); }
  17.     else if(params[0] == 9) { SetHealth(playerid, 90); pInfo[playerid][pDrugAddict] += 9; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); }
  18.     else if(params[0] == 10) { SetHealth(playerid, 100); pInfo[playerid][pDrugAddict] += 10; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); }
  19.     else if(params[0] == 11) { if(pInfo[playerid][pDrugAddict] < 500) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 105); pInfo[playerid][pDrugAddict] += 11; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  20.     else if(params[0] == 12) { if(pInfo[playerid][pDrugAddict] < 1000) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 110); pInfo[playerid][pDrugAddict] += 12; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  21.     else if(params[0] == 13) { if(pInfo[playerid][pDrugAddict] < 1500) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 115); pInfo[playerid][pDrugAddict] += 13; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  22.     else if(params[0] == 14) { if(pInfo[playerid][pDrugAddict] < 2000) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 120); pInfo[playerid][pDrugAddict] += 14; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  23.     else if(params[0] == 15) { if(pInfo[playerid][pDrugAddict] < 2500) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 125); pInfo[playerid][pDrugAddict] += 15; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  24.     else if(params[0] == 16) { if(pInfo[playerid][pDrugAddict] < 3000) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 130); pInfo[playerid][pDrugAddict] += 16; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  25.     else if(params[0] == 17) { if(pInfo[playerid][pDrugAddict] < 3500) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 135); pInfo[playerid][pDrugAddict] += 17; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  26.     else if(params[0] == 18) { if(pInfo[playerid][pDrugAddict] < 4000) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 140); pInfo[playerid][pDrugAddict] += 18; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  27.     else if(params[0] == 19) { if(pInfo[playerid][pDrugAddict] < 4500) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 145); pInfo[playerid][pDrugAddict] += 19; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  28.     else if(params[0] == 20) { if(pInfo[playerid][pDrugAddict] < 5000) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 150); pInfo[playerid][pDrugAddict] += 20; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  29.     else if(params[0] == 21) { if(pInfo[playerid][pDrugAddict] < 5500) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 160); pInfo[playerid][pDrugAddict] += 21; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  30.     else if(params[0] == 22) { if(pInfo[playerid][pDrugAddict] < 6500) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 170); pInfo[playerid][pDrugAddict] += 22; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  31.     else if(params[0] == 23) { if(pInfo[playerid][pDrugAddict] < 7000) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 180); pInfo[playerid][pDrugAddict] += 23; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  32.     else if(params[0] == 24) { if(pInfo[playerid][pDrugAddict] < 7500) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 190); pInfo[playerid][pDrugAddict] += 24; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  33.     else if(params[0] == 25) { if(pInfo[playerid][pDrugAddict] < 8000) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 200); pInfo[playerid][pDrugAddict] += 25; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  34.     else if(params[0] == 26) { if(pInfo[playerid][pDrugAddict] < 8500) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 210); pInfo[playerid][pDrugAddict] += 26; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  35.     else if(params[0] == 27) { if(pInfo[playerid][pDrugAddict] < 9000) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 220); pInfo[playerid][pDrugAddict] += 27; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  36.     else if(params[0] == 28) { if(pInfo[playerid][pDrugAddict] < 9500) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 230); pInfo[playerid][pDrugAddict] += 28; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  37.     else if(params[0] == 29) { if(pInfo[playerid][pDrugAddict] < 10000) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 240); pInfo[playerid][pDrugAddict] += 29; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  38.     else if(params[0] == 30) { if(pInfo[playerid][pDrugAddict] < 10500) { SetHealth(playerid, 0); SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы умерли от передоза!"); } else { SetHealth(playerid, 250); pInfo[playerid][pDrugAddict] += 30; SetTimerEx("@DrugEffectGone", 60000, false, "i", playerid); SetPVarInt(playerid, "DrugsTime", gettime()+60); MeAction(playerid, "принимает дозу наркотиков"); SetPlayerTime(playerid,17,0); SetPlayerDrunkLevel(playerid, 3000); SetPlayerWeather(playerid, -68); } }
  39.     MysqlUpdatePlayerInt(playerid, "drugaddict", pInfo[playerid][pDrugAddict]);
  40.     pInfo[playerid][pDrugs] -= params[0];
  41.     return 1;
  42. }
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
 
Top