Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:bid(playerid, params[])
- {
- new suma, text[128], suma2;
- if(LictatieActiva == 0)return SCM(playerid, -1, "Nu este nici o licitatie activa in acest moment !");
- if(PlayerInfo[playerid][pLevel] < 5)return SCM(playerid, -1, "Ai nevoie de minim level 5 pentru a participa la o licitatie");
- if(sscanf(params, "i", suma))return SCM(playerid, COLOR_FADE2, "Syntax: /bid <suma[bani in banca]>");
- if(suma > PlayerInfo[playerid][pAccount])return SCM(playerid, COLOR_FADE2, "Nu ai destui bani !");
- if(suma < 5000000)return SCM(playerid, COLOR_FADE2, "Suma minim este de $5.000.000");
- 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.");
- 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.");
- suma2 = SumaLicitata[playerid];
- suma2 = SumaLicitata[playerid] + suma;
- format(text, sizeof(text), "Trebuie sa licitezi o suma mai mare decat ceea mai buna oferta oferita pana acum ( $%s )", FormatNumber(SumaMare));
- if(suma < SumaMare)return SCM(playerid, COLOR_FADE2, text);
- SumaMare = suma2;
- ParticipBid[playerid] = 1;
- KillTimer(TimerLicitatie);
- TimerLicitatie = SetTimerEx("OpresteLicitatia", 180000, false, "i");
- foreach(Player, i)
- {
- if(TogBidOn[i] == 0)
- {
- new name[25];
- GetPlayerName(playerid, name, 25);
- format(text, sizeof(text), "%s a licitat ceea mai mare suma de pana acum ! [ $%s ]", name, FormatNumber(SumaMare));
- SCM(i, COLOR_PURPLE, text);
- SCM(i, COLOR_PURPLE, "Perioada de licitatie a fost marita din nou cu 3 minute !");
- }
- }
- PlayerInfo[playerid][pAccount] -= suma;
- Update(playerid, pBank);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement