Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. CMD:bid(playerid, params[])
  2. {
  3. new suma, text[128], suma2;
  4. if(LictatieActiva == 0)return SCM(playerid, -1, "Nu este nici o licitatie activa in acest moment !");
  5. if(PlayerInfo[playerid][pLevel] < 5)return SCM(playerid, -1, "Ai nevoie de minim level 5 pentru a participa la o licitatie");
  6. if(sscanf(params, "i", suma))return SCM(playerid, COLOR_FADE2, "Syntax: /bid <suma[bani in banca]>");
  7. if(suma > PlayerInfo[playerid][pAccount])return SCM(playerid, COLOR_FADE2, "Nu ai destui bani !");
  8. if(suma < 5000000)return SCM(playerid, COLOR_FADE2, "Suma minim este de $5.000.000");
  9. if(LiciteziPentru == 2 && PlayerInfo[playerid][pPbiskey] != 255)return SCM(playerid, -1, "You already own a bussiness, type /sellbiztostate if you want to bid for this one.");
  10. else if(LiciteziPentru == 1 && PlayerInfo[playerid][pPhousekey] != 999)return SCM(playerid, -1, "You already own a house, type /sellhousetostate if you want to bid for this one.");
  11. suma2 = SumaLicitata[playerid];
  12. suma2 = SumaLicitata[playerid] + suma;
  13. format(text, sizeof(text), "Trebuie sa licitezi o suma mai mare decat ceea mai buna oferta oferita pana acum ( $%s )", FormatNumber(SumaMare));
  14. if(suma < SumaMare)return SCM(playerid, COLOR_FADE2, text);
  15. SumaMare = suma2;
  16. ParticipBid[playerid] = 1;
  17. KillTimer(TimerLicitatie);
  18. TimerLicitatie = SetTimerEx("OpresteLicitatia", 180000, false, "i");
  19. foreach(Player, i)
  20. {
  21. if(TogBidOn[i] == 0)
  22. {
  23. new name[25];
  24. GetPlayerName(playerid, name, 25);
  25. format(text, sizeof(text), "%s a licitat ceea mai mare suma de pana acum ! [ $%s ]", name, FormatNumber(SumaMare));
  26. SCM(i, COLOR_PURPLE, text);
  27. SCM(i, COLOR_PURPLE, "Perioada de licitatie a fost marita din nou cu 3 minute !");
  28. }
  29. }
  30. PlayerInfo[playerid][pAccount] -= suma;
  31. Update(playerid, pBank);
  32. return 1;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement