daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Mar 18th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. YCMD:kupidrogu(playerid, params[], help)
  2. {
  3.     if(UlogovanProvera[playerid] == 0) return Error(playerid, "Moras biti prijavljen.");
  4.     //if(KodDilera(playerid) == -1) return Error(playerid,"Niste kod dilera.");
  5.     for(new i; i < sizeof(DilerInfo); i++)
  6.     {
  7.         if(IsPlayerInRangeOfPoint(playerid, 1.5, DilerInfo[i][dX], DilerInfo[i][dY], DilerInfo[i][dZ]))
  8.         {
  9.             new koliko, ids, string[256];
  10.             if(sscanf(params, "ii", ids, koliko))
  11.             {
  12.                 Koristi(playerid, "kupidrogu [(1)cannabis/(2)koka][kolicina]");
  13.                 return 1;
  14.             }
  15.             else if(ids == 1)
  16.             {
  17.                 new cena;
  18.                 new dilercena = DilerInfo[i][dCCena];
  19.                 PI[playerid][Cannabis] += koliko;
  20.                 DilerInfo[i][dCannabis] -= koliko;
  21.                 cena = koliko*dilercena;
  22.                 g_NovacMinus(playerid, cena);
  23.                 format(string, sizeof(string),"~w~Kupili ste ~r~%dG~w~ Cannabisa za ~r~%d$!", koliko, cena);
  24.                 GameTextForPlayer(playerid, string, 5000,4);
  25.             }
  26.             else if(ids == 2)
  27.             {
  28.                 new cena;
  29.                 new dilercena = DilerInfo[i][dKCena];
  30.                 PI[playerid][Kokain] += koliko;
  31.                 DilerInfo[i][dKoka] -= koliko;
  32.                 cena = koliko*dilercena;
  33.                 g_NovacMinus(playerid, cena);
  34.                 format(string, sizeof(string),"~w~Kupili ste ~r~%dG~w~ Koke za ~r~%d$!", koliko, cena);
  35.                 GameTextForPlayer(playerid, string, 5000,4);
  36.             }
  37.         }
  38.         else return Error(playerid, "Niste kod dilera!");
  39.     }
  40.     return 1;
  41. }
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