/pay

Započeo Sef, Septembar 21, 2017, 19:11:00 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Sef

*

Skripta koju koristim:NL(y/ini RG)
Detaljan opis problema:Kada neko da nekom pare na /pay pise da mu je dao 0 al mu zapravo da pare isto tako sa komandom /setstat 0 1 5 kaze da sam postavio level 0 u chatu al zapravo postavi lvl 5
Dio skripte://
Neke slike/video za lakse dobivanje pomoci(neobavezno)://

EDIT by Łuk@ > popravljeno ime teme
Poslednja Izmena: Septembar 22, 2017, 15:00:52 POSLE PODNE od Łuk@
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”


Sef

*

[pawn]CMD:plati(playerid, params[])
{
   new id, iznos, hIme[2][MAX_PLAYER_NAME], Float:Poz[3], ip[24];
   if(sscanf(params, "ui", id, iznos)) return SCM(playerid, BELA, "{33CCFF}Koristite: {FFFFFF}/plati [Korisnicki ID ili Ime igraca] [Iznos (max $5000)]");
   if(!IsPlayerConnected(id)) return GRESKA(playerid, "Taj igrac je offline!");
   GetPlayerPos(id, Poz[0], Poz[1], Poz[2]);
   if(!IsPlayerInRangeOfPoint(playerid, 5.0, Poz[0], Poz[1], Poz[2]) || IgracNaReconu[id] == true) return GRESKA(playerid, "Predaleko ste!");
   if(iznos > 100 && PI[playerid][Nivo] < 4) GRESKA(playerid, "Moras biti nivo 4 da platis preko $100");
   if(iznos < 1 || iznos > 50000) return GRESKA(playerid, "Ne mozete platiti vise od 50.000$!");
   if(PI[playerid][Novac] < iznos) return GRESKA(playerid, "Nemate toliko novca!");
   RPIme(id, hIme[0]);
   RPIme(playerid, hIme[1]);
   SCMF(playerid, GRAD2, "Poslali ste $%d igracu %s.", iznos, hIme[0]);
   SCMF(id, GRAD2, "Primili ste $%d od igraca %s.", iznos, hIme[1]);
   NovacPlus(id, iznos);
   NovacMinus(playerid, iznos);
   format(CmdString, 128, "** %s vadi novcanik, uzima nesto novca i predaje ga %s.", hIme[1], hIme[0]);
   ProxDetector(10.0, playerid, CmdString, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
   GetPlayerIp(playerid, ip, 24);
   format(CmdString, 128, "Komanda: /plati | Izvrsio: %s | Igrac: %s | Iznos: $%d | IP: %s", hIme[1], hIme[0], iznos, ip);
   UpisiLog(FAJL_PAYLOG, CmdString);
   return 1;
}[/pawn]
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”

samo u tim komandama ili ?
heroin rap - Moskri u kuci, od sledece lajne glava ce mi puci

Sef

*

U svim komandama ja msm u kojima se daje u pay u postavi u give Itd..
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”

Daj scr chata
heroin rap - Moskri u kuci, od sledece lajne glava ce mi puci

Sef

*

Evo izvoli
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”

Citat: Sef poslato Septembar 22, 2017, 17:01:35 POSLE PODNE
Evo izvoli
za to 0, iznos == 0 onda da ne moze, daj mi komandu tu give, da ti popravim, msm da znam stae problem
heroin rap - Moskri u kuci, od sledece lajne glava ce mi puci

Sef

*

Al ja zapravo dam vise ne 0 a ono pise da sam dao 0$ u chatu a zapravo dam vise tj iznos koji napisem
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”

vidi da nisi sjebo Å¡ta oko %d
-propo-

Citat: Sef poslato Septembar 22, 2017, 17:27:27 POSLE PODNE
Al ja zapravo dam vise ne 0 a ono pise da sam dao 0$ u chatu a zapravo dam vise tj iznos koji napisem
daj komandu

Citat: NapaćeniBošnjo poslato Septembar 22, 2017, 19:37:51 POSLE PODNE
vidi da nisi sjebo Å¡ta oko %d
zamijenio je u toj komandi %s i %d, barem ja tako mislim
heroin rap - Moskri u kuci, od sledece lajne glava ce mi puci

Sef

*

[pawn]CMD:plati(playerid, params[])
{
   new id, iznos, hIme[2][MAX_PLAYER_NAME], Float:Poz[3], ip[24];
   if(sscanf(params, "ui", id, iznos)) return SCM(playerid, BELA, "{33CCFF}Koristite: {FFFFFF}/plati [Korisnicki ID ili Ime igraca] [Iznos (max $5000)]");
   if(!IsPlayerConnected(id)) return GRESKA(playerid, "Taj igrac je offline!");
   GetPlayerPos(id, Poz[0], Poz[1], Poz[2]);
   if(!IsPlayerInRangeOfPoint(playerid, 5.0, Poz[0], Poz[1], Poz[2]) || IgracNaReconu[id] == true) return GRESKA(playerid, "Predaleko ste!");
   if(iznos > 100 && PI[playerid][Nivo] < 4) GRESKA(playerid, "Moras biti nivo 4 da platis preko $100");
   if(iznos < 1 || iznos > 50000) return GRESKA(playerid, "Ne mozete platiti vise od 50.000$!");
   if(PI[playerid][Novac] < iznos) return GRESKA(playerid, "Nemate toliko novca!");
   RPIme(id, hIme[0]);
   RPIme(playerid, hIme[1]);
   SCMF(playerid, GRAD2, "Poslali ste $%d igracu %s.", iznos, hIme[0]);
   SCMF(id, GRAD2, "Primili ste $%d od igraca %s.", iznos, hIme[1]);
   NovacPlus(id, iznos);
   NovacMinus(playerid, iznos);
   format(CmdString, 128, "** %s vadi novcanik, uzima nesto novca i predaje ga %s.", hIme[1], hIme[0]);
   ProxDetector(10.0, playerid, CmdString, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
   GetPlayerIp(playerid, ip, 24);
   format(CmdString, 128, "Komanda: /plati | Izvrsio: %s | Igrac: %s | Iznos: $%d | IP: %s", hIme[1], hIme[0], iznos, ip);
   UpisiLog(FAJL_PAYLOG, CmdString);
   return 1;
}[/pawn]
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”

Kazem ti da mi posaljes komandu /give.
heroin rap - Moskri u kuci, od sledece lajne glava ce mi puci

Sef

*

[pawn]CMD:daj(playerid, params[])
{
    new id, stvar[16], kolicina, cmds[128], hIme1[MAX_PLAYER_NAME], hIme2[MAX_PLAYER_NAME];
    if(sscanf(params, "uis[16]", id, kolicina, stvar))
   {
      SCM(playerid, BELA, "{33CCFF}Koristite: {FFFFFF}/daj [ID] [Kolicina] [Stvar]");
      SCM(playerid, GRAD2, "Dostupne stvari: {FFFFFF}droga, pizza, oruzje, uze, zice");
      return 1;
   }
   if(!IsPlayerConnected(id)) return GRESKA(playerid, "Taj igrac je offline!");
   if(id == playerid) return GRESKA(playerid, "Ne mozete sami sebi dati nesto!");
   if(kolicina < 0 || kolicina > 10000) return GRESKA(playerid, "Nepoznat unos za kolicinu!");
   if(PI[playerid][Zatvoren] > 0) return GRESKA(playerid, "Ne mozete koristiti ovu komandu dok ste u zatvoru!");
   if(PI[playerid][Zavezan] > 0) return GRESKA(playerid, "Ne mozete koristiti ovu komandu dok ste zavezani/uhapseni!");
   new Float:Poz[3];
   GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
   if(!IsPlayerInRangeOfPoint(id, 5.0, Poz[0], Poz[1], Poz[2])) return GRESKA(playerid, "Taj igrac nije u vasoj blizini");
   GetPlayerName(playerid, hIme1, sizeof(hIme1));
   GetPlayerName(id, hIme2, sizeof(hIme2));
   if(!strcmp(stvar, "droga", true))
   {
       if(Stvari[playerid][zDroga] < kolicina && Dzep[playerid][xDroga] < kolicina) return GRESKA(playerid, "Nemate toliko droge kod sebe!");
        if(Stvari[playerid][zDroga] >= kolicina && Dzep[playerid][xDroga] < kolicina) Stvari[playerid][zDroga] -= kolicina;
        else if(Stvari[playerid][zDroga] >= kolicina && Dzep[playerid][xDroga] >= kolicina) Stvari[playerid][zDroga] -= kolicina;
        else if(Stvari[playerid][zDroga] < kolicina && Dzep[playerid][xDroga] >= kolicina) Dzep[playerid][xDroga] -= kolicina;
        else return SCM(playerid, GRAD2, "Greska, prijavite ovo na forum!");
        if(kolicina < 0 || kolicina > 10000) return GRESKA(playerid, "Previse ili premalo!");
      Dzep[id][xDroga] += kolicina;
       format(cmds, sizeof cmds, " * Dali ste %d grama droge igracu %s.", kolicina, hIme2);
       SCM(playerid, SVETLOPLAVA, cmds);
       format(cmds, sizeof cmds, " * Primili te %d grama droge od igraca %s.", kolicina, hIme1);
       SCM(id, ZUTA, cmds);
       format(cmds, sizeof cmds, " * %s vadi cudnu vrecicu i predaje ju %s.", hIme1, hIme2);
      ProxDetector(20.0, playerid, cmds, LJUBICASTA, LJUBICASTA, LJUBICASTA, LJUBICASTA, LJUBICASTA);
      SacuvajIgraca(playerid);
      SacuvajIgraca(id);
   }
   else if(!strcmp(stvar, "pizza", true))
   {
       if(Stvari[playerid][zPizza] < kolicina) return GRESKA(playerid, "Nemate toliko pizza kod sebe!");
        if(kolicina < 0 || kolicina > 10000) return GRESKA(playerid, "Previse ili premalo!");
        Stvari[playerid][zPizza] -= kolicina;
      Stvari[id][zPizza] += kolicina;
       format(cmds, sizeof cmds, " * Dali ste %d pizza igracu %s.", kolicina, hIme2);
       SCM(playerid, SVETLOPLAVA, cmds);
       format(cmds, sizeof cmds, " * Primili te %d pizza od igraca %s.", kolicina, hIme1);
       SCM(id, ZUTA, cmds);
       format(cmds, sizeof cmds, " * %s vadi pizzu i predaje ju %s.", hIme1, hIme2);
      ProxDetector(20.0, playerid, cmds, LJUBICASTA, LJUBICASTA, LJUBICASTA, LJUBICASTA, LJUBICASTA);
        SacuvajIgraca(playerid);
      SacuvajIgraca(id);
   }
   else if(!strcmp(stvar, "oruzje", true))
   {
       if(IgracPolicajac(playerid)) return GRESKA(playerid, "Clanovi policije ne mogu da daju oruzje drugim igracima!");
       if(GetPlayerWeapon(playerid) == 0) return GRESKA(playerid, "Nemate nijedno oruzje u ruci!");
        if(kolicina < 0 || kolicina > 10000) return GRESKA(playerid, "Previse ili premalo!");
       if(GetPlayerAmmo(playerid) < kolicina) return GRESKA(playerid, "Nemate toliko metaka!");
       if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid,  COLOR_GRESKA, ".:EShield:. |{FFFFFF} Ne mozete da date oruzje dok ste u autu!");
       for(new i = 0; i < 13; i++) { if(OruzjeOtkriveno[playerid] != -1) return GRESKA(playerid, "Ne mozete da date oruzje, pokusajte ponovo za par sekundi!"); }
       new oruzje = GetPlayerWeapon(playerid);
      new municijaplayerid = GetPlayerAmmo(playerid);
      new municijanova = municijaplayerid - kolicina;
      GivePlayerWeaponEx(id, oruzje, kolicina);
      SetPlayerAmmo(playerid, oruzje, municijanova);
      format(cmds, sizeof cmds, " * Dali ste oruzje sa %d metaka igracu %s. Sada imate jos %d metaka u oruzju koje vam je u rukama.", kolicina, hIme2, GetPlayerAmmo(playerid));
      SCM(playerid, SVETLOPLAVA, cmds);
      format(cmds, sizeof cmds, " * Primili ste %d metaka od igraca %s. Sada imate %d metaka u oruzju koje vam je u rukama.", kolicina, hIme1, GetPlayerAmmo(id));
      SCM(id, ZUTA, cmds);
   }
   else if(!strcmp(stvar, "zice", true))
   {
       if(Stvari[playerid][zZice] < kolicina && Dzep[playerid][xZice] < kolicina) return GRESKA(playerid, "Nemate toliko žica kod sebe!");
        if(kolicina < 0 || kolicina > 10000) return GRESKA(playerid, "Previse ili premalo!");
        if(Stvari[playerid][zZice] >= kolicina && Dzep[playerid][xZice] < kolicina) Stvari[playerid][zZice] -= kolicina;
        else if(Stvari[playerid][zZice] >= kolicina && Dzep[playerid][xZice] >= kolicina) Stvari[playerid][zZice] -= kolicina;
        else if(Stvari[playerid][zZice] < kolicina && Dzep[playerid][xZice] >= kolicina) Dzep[playerid][xZice] -= kolicina;
        else return SCM(playerid, GRAD2, "Greska, prijavite ovo na forum!");
        if(Stvari[id][zTorba] == 0 && Dzep[id][xZice] >= 3) return GRESKA(playerid, "Taj igrac nema mjesta za zice!");
         if(Stvari[id][zTorba] == 1 && Stvari[id][zZice] >= 10) return GRESKA(playerid, "Taj igrac nema mjesta za zice!");
      if(Dzep[id][xZice] >= 0 && Dzep[id][xZice] < 3) Dzep[id][xZice] += kolicina;
         else if(Stvari[id][zTorba] == 1 && Stvari[id][zZice] < 10) Stvari[id][zZice] += kolicina;
        else return SCM(playerid, GRAD2, "Greska, prijavite ovo na forum!");
       format(cmds, sizeof cmds, " * Dali ste %d žica igracu %s.", kolicina, hIme2);
       SCM(playerid, SVETLOPLAVA, cmds);
       format(cmds, sizeof cmds, " * Primili ste %d žica od igraca %s.", kolicina, hIme1);
       SCM(id, ZUTA, cmds);
       format(cmds, sizeof cmds, " * %s vadi žice i predaje ih %s.", hIme1, hIme2);
      ProxDetector(20.0, playerid, cmds, LJUBICASTA, LJUBICASTA, LJUBICASTA, LJUBICASTA, LJUBICASTA);
      SacuvajIgraca(playerid);
      SacuvajIgraca(id);
   }
   else if(!strcmp(stvar, "uze", true))
   {
       if(Stvari[playerid][zUze] < kolicina && Dzep[playerid][xUze] < kolicina) return GRESKA(playerid, "Nemate toliko užadi kod sebe!");
        if(kolicina < 0 || kolicina > 10000) return GRESKA(playerid, "Previse ili premalo!");
        if(Stvari[playerid][zUze] >= kolicina && Dzep[playerid][xUze] < kolicina) Stvari[playerid][zUze] -= kolicina;
        else if(Stvari[playerid][zUze] >= kolicina && Dzep[playerid][xUze] >= kolicina) Stvari[playerid][zUze] -= kolicina;
        else if(Stvari[playerid][zUze] < kolicina && Dzep[playerid][xUze] >= kolicina) Dzep[playerid][xUze] -= kolicina;
        else return SCM(playerid, GRAD2, "Greska, prijavite ovo na forum!");
        if(Stvari[id][zTorba] == 0 && Dzep[id][xUze] >= 3) return GRESKA(playerid, "Taj igrac nema mjesta za užad!");
         if(Stvari[id][zTorba] == 1 && Stvari[id][zUze] >= 10) return GRESKA(playerid, "Taj igrac nema mjesta za užad!");
      if(Dzep[id][xUze] >= 0 && Dzep[id][xUze] < 3) Dzep[id][xUze] += kolicina;
         else if(Stvari[id][zUze] == 1 && Stvari[id][zUze] < 10) Stvari[id][zUze] += kolicina;
        else return SCM(playerid, GRAD2, "Greska, prijavite ovo na forum!");
       format(cmds, sizeof cmds, " * Dali ste %d užadi igracu %s.", kolicina, hIme2);
       SCM(playerid, SVETLOPLAVA, cmds);
       format(cmds, sizeof cmds, " * Primili te %d užadi od igraca %s.", kolicina, hIme1);
       SCM(id, ZUTA, cmds);
       format(cmds, sizeof cmds, " * %s vadi uže i predaje ga %s.", hIme1, hIme2);
      ProxDetector(20.0, playerid, cmds, LJUBICASTA, LJUBICASTA, LJUBICASTA, LJUBICASTA, LJUBICASTA);
      SacuvajIgraca(playerid);
      SacuvajIgraca(id);
   }
   else return GRESKA(playerid, "Nepoznata stvar!");
   return 1;
}[/pawn]
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”