[Pomoc]ATM

Započeo Retardinjo, April 11, 2011, 13:07:00 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim:Cyber
Detaljan opis problema:Mogu da dizem sa ATM-a pare bilo gdje  :'( nekontam u cemu je problem kod skripte ?
Dio skripte:    if(strcmp(cmd, "/atmwithdraw", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
           if(IsPlayerInRangeOfPoint(playerid, 6.0, 1034.45593262,-1024.63781738,31.74446106))
           if(IsPlayerInRangeOfPoint(playerid, 6.0, 1210.35656738,-916.02075195,42.67547607))
           if(IsPlayerInRangeOfPoint(playerid, 6.0, 1834.03784180,-1851.03039551,13.03264713))
           if(IsPlayerInRangeOfPoint(playerid, 6.0, 1286.09313965,-1662.60424805,13.18977451))
           if(IsPlayerInRangeOfPoint(playerid, 6.0, 1027.52441406,-946.51159668,42.25454712))
           if(IsPlayerInRangeOfPoint(playerid, 6.0, 1307.07653809,328.18820190,19.19758606))
           if(IsPlayerInRangeOfPoint(playerid, 6.0, 1381.05981445,259.62057495,19.20983124))
        {
             SendClientMessage(playerid, SIVA, "   Niste blizu Bankomata !");
            return 1;
        }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), "  Na Racunu imate: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strvalEx(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), "  Na Racunu ima te: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, CRVENA, "  Nemate toliko puno Novaca !");
return 1;
}
    ConsumingMoney[playerid] = 1;
JB_GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), "  Vi ste podigli $%d sa svoga racuna Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): //

poznaticovik

Radi sa PlayerToPoint i izbriši ovo Nisi blizu bankomata.

I ako želiš da piše "Nisi blizu bankomata" dodaj ovo na kraj

}
else
{
    SendClientMessage(playerid, COLOR_RED, "   Nisi blizu bankomata !");
            return 1;
}
}
return 1;
}


Znači da bi ti kod ovako izgledao

   if(strcmp(cmd, "/atmwithdraw", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
           if(IsPlayerInRangeOfPoint(playerid, 6.0, 1034.45593262,-1024.63781738,31.74446106))
           if(IsPlayerInRangeOfPoint(playerid, 6.0, 1210.35656738,-916.02075195,42.67547607))
           if(IsPlayerInRangeOfPoint(playerid, 6.0, 1834.03784180,-1851.03039551,13.03264713))
           if(IsPlayerInRangeOfPoint(playerid, 6.0, 1286.09313965,-1662.60424805,13.18977451))
           if(IsPlayerInRangeOfPoint(playerid, 6.0, 1027.52441406,-946.51159668,42.25454712))
           if(IsPlayerInRangeOfPoint(playerid, 6.0, 1307.07653809,328.18820190,19.19758606))
           if(IsPlayerInRangeOfPoint(playerid, 6.0, 1381.05981445,259.62057495,19.20983124))
        {
             SendClientMessage(playerid, SIVA, "   Niste blizu Bankomata !");
            return 1;
        }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), "  Na Racunu imate: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strvalEx(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), "  Na Racunu ima te: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, CRVENA, "  Nemate toliko puno Novaca !");
return 1;
}
    ConsumingMoney[playerid] = 1;
JB_GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), "  Vi ste podigli $%d sa svoga racuna Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
      }
else
{
    SendClientMessage(playerid, COLOR_RED, "   Nisi blizu bankomata !");
            return 1;
}
}
return 1;
}

Citat: [M]att poslato April 11, 2011, 14:07:33 POSLE PODNE
Radi sa PlayerToPoint i izbriši ovo Nisi blizu bankomata.

I ako želiš da piše "Nisi blizu bankomata" dodaj ovo na kraj

}
else
{
  SendClientMessage(playerid, COLOR_RED, "   Nisi blizu bankomata !");
           return 1;
}
}
return 1;
}


Znači da bi ti kod ovako izgledao  sta si ovdje promjenio??

  if(strcmp(cmd, "/atmwithdraw", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
          if(IsPlayerInRangeOfPoint(playerid, 6.0, 1034.45593262,-1024.63781738,31.74446106))
          if(IsPlayerInRangeOfPoint(playerid, 6.0, 1210.35656738,-916.02075195,42.67547607))
          if(IsPlayerInRangeOfPoint(playerid, 6.0, 1834.03784180,-1851.03039551,13.03264713))
          if(IsPlayerInRangeOfPoint(playerid, 6.0, 1286.09313965,-1662.60424805,13.18977451))
          if(IsPlayerInRangeOfPoint(playerid, 6.0, 1027.52441406,-946.51159668,42.25454712))
          if(IsPlayerInRangeOfPoint(playerid, 6.0, 1307.07653809,328.18820190,19.19758606))
          if(IsPlayerInRangeOfPoint(playerid, 6.0, 1381.05981445,259.62057495,19.20983124))
       {
            SendClientMessage(playerid, SIVA, "   Niste blizu Bankomata !");
           return 1;
       }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), "  Na Racunu imate: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strvalEx(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), "  Na Racunu ima te: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, CRVENA, "  Nemate toliko puno Novaca !");
return 1;
}
   ConsumingMoney[playerid] = 1;
JB_GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), "  Vi ste podigli $%d sa svoga racuna Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
      }
else
{
  SendClientMessage(playerid, COLOR_RED, "   Nisi blizu bankomata !");
           return 1;
}
}
return 1;
}


EDIT:
Kad ubacim tvoju komandu dobijem ovo:
Poslednja Izmena: April 11, 2011, 14:47:02 POSLE PODNE od Gangasta300

poznaticovik

Pogledaj kraj koda.

EDIT: ÄŒudno meni ne baca nikake warninge , sve radi.
Poslednja Izmena: April 11, 2011, 14:49:31 POSLE PODNE od [M]att


if(strcmp(cmd, "/atmwithdraw", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(!IsPlayerInRangeOfPoint(playerid, 3, //ovde stavi lokaciju dje zelis da moze koristit ovu komandu) && !IsPlayerInRangeOfPoint(playerid, 3, //tu drugu lokaciju itd..))
        {
            SendClientMessage(playerid, SIVA, "   Ti nisi kod bankomata!");
            return 1;
        }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Korištenje: /atmwithdraw [amount]");
format(string, sizeof(string), "  ImaÅ¡ $%d na računu.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Korištenje: /atmwithdraw [amount]");
format(string, sizeof(string), "  ImaÅ¡ $%d na racunu.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "   NemaÅ¡ toliko !");
return 1;
}


if (cashdeposit > 5000)
{
SendClientMessage(playerid, COLOR_GRAD2, "   NemožeÅ¡ podignuti viÅ¡e od $5000!");
return 1;
}

    ConsumingMoney[playerid] = 1;
JB_GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), "  Podigao si $%d sa racuna Ukupno: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
PlayerInfo[playerid][pJobTimer] = 12;
            GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "  ID(%d) -%s je podignuo %d sa racuna.", playerid,giveplayer,cashdeposit);
BroadCast(ZUTA,string);

new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /atmwithdraw ($%d)",d,m,y,h,mi,s,sendername, cashdeposit);
PayLog(string);
return 1;
}
return 1;
}

jel mogu ovako da napravim??

if(IsPlayerInRangeOfPoint(playerid, 6.0, 1034.45593262,-1024.63781738,31.74446106) || IsPlayerInRangeOfPoint(playerid, 6.0, 1210.35656738,-916.02075195,42.67547607) || IsPlayerInRangeOfPoint(playerid, 6.0, 1834.03784180,-1851.03039551,13.03264713) || IsPlayerInRangeOfPoint(playerid, 6.0, 1286.09313965,-1662.60424805,13.18977451) || IsPlayerInRangeOfPoint(playerid,
6.0, 1027.52441406,-946.51159668,42.25454712) || IsPlayerInRangeOfPoint(playerid, 6.0, 1307.07653809,328.18820190,19.19758606) || IsPlayerInRangeOfPoint(playerid, 6.0, 1381.05981445,259.62057495,19.20983124))


EDIT:
daje mi error za : pJobTimer
Poslednja Izmena: April 11, 2011, 15:04:02 POSLE PODNE od Gangasta300

Naravno  8)

EDIT:pod enum pInfo dodaj pJobTimer,
Poslednja Izmena: April 11, 2011, 15:05:37 POSLE PODNE od Paul McCartney


poznaticovik

Citat: Gangasta300 poslato April 11, 2011, 15:03:09 POSLE PODNE
jel mogu ovako da napravim??

if(IsPlayerInRangeOfPoint(playerid, 6.0, 1034.45593262,-1024.63781738,31.74446106) || IsPlayerInRangeOfPoint(playerid, 6.0, 1210.35656738,-916.02075195,42.67547607) || IsPlayerInRangeOfPoint(playerid, 6.0, 1834.03784180,-1851.03039551,13.03264713) || IsPlayerInRangeOfPoint(playerid, 6.0, 1286.09313965,-1662.60424805,13.18977451) || IsPlayerInRangeOfPoint(playerid,
6.0, 1027.52441406,-946.51159668,42.25454712) || IsPlayerInRangeOfPoint(playerid, 6.0, 1307.07653809,328.18820190,19.19758606) || IsPlayerInRangeOfPoint(playerid, 6.0, 1381.05981445,259.62057495,19.20983124))


EDIT:
daje mi error za : pJobTimer

Kakav točan error? Ima milijun vrsta errora/warninga napiši koji.

Procitaj moj prijasnji post...reko sam mu stra trea...ak bude jos errora javi!

Ev iso sam test al opet isto :


Ispricavam se na cyberu mislim da treba ic ovak

if(!IsPlayerInRangeOfPoint(playerid, 3, -32.276363,-57.995586,1003.139953) && !IsPlayerInRangeOfPoint(playerid, 3, 374.718902,167.128982,1007.987304))

I sad ih tak nizas redom kolko ti treba pozicija mislim da bi ovak trebalo ic ako oces vise pozivcija

if(!IsPlayerInRangeOfPoint(playerid, 3, -32.276363,-57.995586,1003.139953) && !IsPlayerInRangeOfPoint(playerid, 3, 374.718902,167.128982,1007.987304 && !IsPlayerInRangeOfPoint(playerid, 3, 374.718902,167.128982,1007.987304)) && !IsPlayerInRangeOfPoint(playerid, 3, 374.718902,167.128982,1007.987304

EDIT:Nezz dal tocno govorim posto nisam neki pro skripter...:D...samo ako neÄ'e grijesim da me netko isparvi
Poslednja Izmena: April 11, 2011, 15:17:41 POSLE PODNE od Paul McCartney

dobivam errore kad stavim na taj nacin  :o

if(!IsPlayerInRangeOfPoint(playerid, 3, 1034.45593262,-1024.63781738,31.74446106) && !IsPlayerInRangeOfPoint(playerid, 3, 1210.35656738,-916.02075195,42.67547607 && !IsPlayerInRangeOfPoint(playerid, 3, 1834.03784180,-1851.03039551,13.03264713)) && !IsPlayerInRangeOfPoint(playerid, 3, 1286.09313965,-1662.60424805,13.18977451)
&& !IsPlayerInRangeOfPoint(playerid, 3, 1027.52441406,-946.51159668,42.25454712 && !IsPlayerInRangeOfPoint(playerid, 3, 1307.07653809,328.18820190,19.19758606)) && !IsPlayerInRangeOfPoint(playerid, 3, 1381.05981445,259.62057495,19.20983124)