Kako da uredim ovaj atm

Započeo LuKsA
16. Okt. 2009.
1,213
pregleda
5
postova
GGC
5
Godfather
16. Okt. 2009.
Sredio sam atm system ali kad  sam ubacio ove kordinate na tim kordinatama kod atma ne mogu uzeti novac ali kad sam udaljen mogu
pa ko moze pomoc dasamo na tim kordinatama mozes podnci poloziti novac
//----------------------------------[ATM System]-----------------------------------------------
    if(strcmp(cmd, "/atmwithdraw", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
            if(PlayerToPoint(3.0,playerid,1210.9574,-915.6220,43.0260) || PlayerToPoint(3.0,playerid,589.3055,-1253.3296,18.2150)
            || PlayerToPoint(3.0,playerid,1135.3281,-1471.9373,15.7919) ||  PlayerToPoint(3.0,playerid,1137.1283,-1630.1025,13.8844)
            || PlayerToPoint(3.0,playerid,1929.3414,-1769.5410,13.5469))

      {
            SendClientMessage(playerid, COLOR_GREY, "  Nisi blizu bankomata !");
            return 1;
      }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                  SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /atmwithdraw ");
                  format(string, sizeof(string), "  Imas $%d na svojem racunu.", PlayerInfo);
                  SendClientMessage(playerid, COLOR_GRAD3, string);
                  return 1;
            }
            new cashdeposit = strval(tmp);
            if(!strlen(tmp))
            {
                  SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /atmwithdraw ");
                  format(string, sizeof(string), "  Imas $%d na svojem racunu.", PlayerInfo);
                  SendClientMessage(playerid, COLOR_GRAD3, string);
                  return 1;
              }
            if (cashdeposit > PlayerInfo || cashdeposit < 1)
            {
                SendClientMessage(playerid, COLOR_GRAD2, "  Nemas tako puno novca !");
                return 1;
            }
            GivePlayerMoney(playerid,cashdeposit);
            PlayerInfo=PlayerInfo-cashdeposit;
            format(string, sizeof(string), "  Podigao si $%d sa svog racuna. Ukupno: $%d ", cashdeposit,PlayerInfo);
            SendClientMessage(playerid, COLOR_YELLOW, string);
            return 1;
      }
      return 1;
    }
    if(strcmp(cmd, "/atmbank", true) == 0 || strcmp(cmd, "/atmdeposit", true) == 0)
    {
          if(IsPlayerConnected(playerid))
          {
              if(PlayerToPoint(3.0,playerid,1210.9574,-915.6220,43.0260) || PlayerToPoint(3.0,playerid,589.3055,-1253.3296,18.2150)
              || PlayerToPoint(3.0,playerid,1135.3281,-1471.9373,15.7919) ||  PlayerToPoint(3.0,playerid,1137.1283,-1630.1025,13.8844)
              || PlayerToPoint(3.0,playerid,1929.3414,-1769.5410,13.5469))
              {
              SendClientMessage(playerid, COLOR_GREY, "  Nisi blizu bankomata !");
              return 1;
          }
              tmp = strtok(cmdtext, idx);
              if(!strlen(tmp))
              {
                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /atmbank ");
                    format(string, sizeof(string), "  Imas $%d na svom racunu.", PlayerInfo);
                    SendClientMessage(playerid, COLOR_GRAD3, string);
                    return 1;
              }
              new cashdeposit = strval(tmp);
              if(!strlen(tmp))
              {
                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /atmbank ");
                    format(string, sizeof(string), "  Imas $%d na svom racunu.", PlayerInfo);
                    SendClientMessage(playerid, COLOR_GRAD3, string);
                    return 1;
              }
              if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
              {
                    SendClientMessage(playerid, COLOR_GRAD2, "  Nemas tako puno novca");
                    return 1;
              }
              GivePlayerMoney(playerid,-cashdeposit);
              new curfunds = PlayerInfo;
              PlayerInfo=cashdeposit+PlayerInfo;
              SendClientMessage(playerid, COLOR_WHITE, "|___ BANK STATMENT ___|");
              format(string, sizeof(string), "  Stara Svota: $%d", curfunds);
              SendClientMessage(playerid, COLOR_GRAD2, string);
              format(string, sizeof(string), "  Stavljeno na racun: $%d",cashdeposit);
              SendClientMessage(playerid, COLOR_GRAD4, string);
              SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
              format(string, sizeof(string), "  Nova Svota: $%d", PlayerInfo);
              SendClientMessage(playerid, COLOR_WHITE, string);
              return 1;
          }
          return 1;
    }
    if(strcmp(cmd, "/atmbalance", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
              if(PlayerToPoint(3.0,playerid,1210.9574,-915.6220,43.0260) || PlayerToPoint(3.0,playerid,589.3055,-1253.3296,18.2150)
              || PlayerToPoint(3.0,playerid,1135.3281,-1471.9373,15.7919) ||  PlayerToPoint(3.0,playerid,1137.1283,-1630.1025,13.8844)
              || PlayerToPoint(3.0,playerid,1929.3414,-1769.5410,13.5469))
              {
                  SendClientMessage(playerid, COLOR_GREY, "  Nisi blizu bankomata !");
                  return 1;
              }
              format(string, sizeof(string), "  Imas $%d na svom racunu.",PlayerInfo);
              SendClientMessage(playerid, COLOR_YELLOW, string);
        }
        return 1;
    }
    if(strcmp(cmd, "/atmtransfer", true) == 0 || strcmp(cmd, "/atmwiretransfer", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo < 3)
            {
                  SendClientMessage(playerid, COLOR_GRAD1, "  Moras Biti LVL 3 !");
                  return 1;
            }
            if(PlayerToPoint(3.0,playerid,1210.9574,-915.6220,43.0260) || PlayerToPoint(3.0,playerid,589.3055,-1253.3296,18.2150)
            || PlayerToPoint(3.0,playerid,1135.3281,-1471.9373,15.7919) ||  PlayerToPoint(3.0,playerid,1137.1283,-1630.1025,13.8844)
            || PlayerToPoint(3.0,playerid,1929.3414,-1769.5410,13.5469))
            {
                  SendClientMessage(playerid, COLOR_GREY, "  Nisi blizu bankomata !");
                  return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                  SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /atmtransfer [playerid/PartOfName] ");
                  return 1;
            }
            giveplayerid = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                  SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /atmtransfer [playerid/PartOfName] ");
                  return 1;
            }
            moneys = strval(tmp);
            if (IsPlayerConnected(giveplayerid))
            {
                  if(giveplayerid != INVALID_PLAYER_ID)
                  {
                        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        playermoney = PlayerInfo ;
                        if (moneys > 0 && playermoney >= moneys)
                        {
                              PlayerInfo -= moneys;
                              PlayerInfo += moneys;
                              format(string, sizeof(string), "  Prebacio si $%d na %s racun", moneys, giveplayer,giveplayerid);
                              PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                              SendClientMessage(playerid, COLOR_GRAD1, string);
                              format(string, sizeof(string), "  Dobio si $%d na svoj racun od %s", moneys, sendername, playerid);
                              SendClientMessage(giveplayerid, COLOR_GRAD1, string);
                              format(string, sizeof(string), "%s prebacio si $%d na %s", sendername, moneys, giveplayer);
                              if(moneys >= 500000)
                              {
                                  ABroadCast(COLOR_YELLOW,string,1);
                              }
                              printf("%s", string);
                              PayLog(string);
                              PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
                              }
                              else
                              {
                                  SendClientMessage(playerid, COLOR_GRAD1, "  Nepravilna svota transakcije.");
                              }
                      }
                }
                else
                {
                    format(string, sizeof(string), "  %d igrac nije aktivan.", giveplayerid);
                    SendClientMessage(playerid, COLOR_GRAD1, string);
                }
        }
        return 1;
    }


kordinate sam vec ubacio i radi nema erora niti warna ali treba da samo na tim kordinatam mogu podici poloziti novac

Hvala

edit by Aleksa
SOaD
4
Shot Caller
17. Okt. 2009.
ALO BRE!!! JEL SI CUO TI NEKAD ZA "Code" a😕 :S ... daj stavljaj u code sve :S
GGC
5
Godfather
17. Okt. 2009.
ok sry zaboravio  :S al moze ta pomoc ?
Aleksa
4
Made Man
19. Okt. 2009.
GGC wrote on October 16, 2009, 8:48 pm:
Sredio sam atm system ali kad  sam ubacio ove kordinate na tim kordinatama kod atma ne mogu uzeti novac ali kad sam udaljen mogu
pa ko moze pomoc dasamo na tim kordinatama mozes podnci poloziti novac
//----------------------------------[ATM System]-----------------------------------------------
    if(strcmp(cmd, "/atmwithdraw", true) == 0)
    {
       if(IsPlayerConnected(playerid))
       {
            if(PlayerToPoint(3.0,playerid,1210.9574,-915.6220,43.0260) || PlayerToPoint(3.0,playerid,589.3055,-1253.3296,18.2150)
            || PlayerToPoint(3.0,playerid,1135.3281,-1471.9373,15.7919) ||  PlayerToPoint(3.0,playerid,1137.1283,-1630.1025,13.8844)
            || PlayerToPoint(3.0,playerid,1929.3414,-1769.5410,13.5469))

       {
            SendClientMessage(playerid, COLOR_GREY, "   Nisi blizu bankomata !");
            return 1;
       }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                   SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /atmwithdraw ");
                   format(string, sizeof(string), "  Imas $%d na svojem racunu.", PlayerInfo);
                   SendClientMessage(playerid, COLOR_GRAD3, string);
                   return 1;
            }
            new cashdeposit = strval(tmp);
            if(!strlen(tmp))
            {
                   SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /atmwithdraw ");
                   format(string, sizeof(string), "  Imas $%d na svojem racunu.", PlayerInfo);
                   SendClientMessage(playerid, COLOR_GRAD3, string);
                   return 1;
               }
            if (cashdeposit > PlayerInfo || cashdeposit < 1)
            {
                 SendClientMessage(playerid, COLOR_GRAD2, "   Nemas tako puno novca !");
                 return 1;
            }
            GivePlayerMoney(playerid,cashdeposit);
            PlayerInfo=PlayerInfo-cashdeposit;
            format(string, sizeof(string), "  Podigao si $%d sa svog racuna. Ukupno: $%d ", cashdeposit,PlayerInfo);
            SendClientMessage(playerid, COLOR_YELLOW, string);
            return 1;
       }
       return 1;
    }
    if(strcmp(cmd, "/atmbank", true) == 0 || strcmp(cmd, "/atmdeposit", true) == 0)
    {
          if(IsPlayerConnected(playerid))
          {
               if(PlayerToPoint(3.0,playerid,1210.9574,-915.6220,43.0260) || PlayerToPoint(3.0,playerid,589.3055,-1253.3296,18.2150)
               || PlayerToPoint(3.0,playerid,1135.3281,-1471.9373,15.7919) ||  PlayerToPoint(3.0,playerid,1137.1283,-1630.1025,13.8844)
               || PlayerToPoint(3.0,playerid,1929.3414,-1769.5410,13.5469))
               {
               SendClientMessage(playerid, COLOR_GREY, "   Nisi blizu bankomata !");
               return 1;
          }
               tmp = strtok(cmdtext, idx);
               if(!strlen(tmp))
               {
                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /atmbank ");
                    format(string, sizeof(string), "  Imas $%d na svom racunu.", PlayerInfo);
                    SendClientMessage(playerid, COLOR_GRAD3, string);
                    return 1;
               }
               new cashdeposit = strval(tmp);
               if(!strlen(tmp))
               {
                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /atmbank ");
                    format(string, sizeof(string), "  Imas $%d na svom racunu.", PlayerInfo);
                    SendClientMessage(playerid, COLOR_GRAD3, string);
                    return 1;
               }
               if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
               {
                    SendClientMessage(playerid, COLOR_GRAD2, "   Nemas tako puno novca");
                    return 1;
               }
               GivePlayerMoney(playerid,-cashdeposit);
               new curfunds = PlayerInfo;
               PlayerInfo=cashdeposit+PlayerInfo;
               SendClientMessage(playerid, COLOR_WHITE, "|___ BANK STATMENT ___|");
               format(string, sizeof(string), "  Stara Svota: $%d", curfunds);
               SendClientMessage(playerid, COLOR_GRAD2, string);
               format(string, sizeof(string), "  Stavljeno na racun: $%d",cashdeposit);
               SendClientMessage(playerid, COLOR_GRAD4, string);
               SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
               format(string, sizeof(string), "  Nova Svota: $%d", PlayerInfo);
               SendClientMessage(playerid, COLOR_WHITE, string);
               return 1;
          }
          return 1;
    }
    if(strcmp(cmd, "/atmbalance", true) == 0)
    {
         if(IsPlayerConnected(playerid))
         {
              if(PlayerToPoint(3.0,playerid,1210.9574,-915.6220,43.0260) || PlayerToPoint(3.0,playerid,589.3055,-1253.3296,18.2150)
              || PlayerToPoint(3.0,playerid,1135.3281,-1471.9373,15.7919) ||  PlayerToPoint(3.0,playerid,1137.1283,-1630.1025,13.8844)
              || PlayerToPoint(3.0,playerid,1929.3414,-1769.5410,13.5469))
              {
                  SendClientMessage(playerid, COLOR_GREY, "   Nisi blizu bankomata !");
                  return 1;
              }
              format(string, sizeof(string), "  Imas $%d na svom racunu.",PlayerInfo);
              SendClientMessage(playerid, COLOR_YELLOW, string);
         }
         return 1;
    }
    if(strcmp(cmd, "/atmtransfer", true) == 0 || strcmp(cmd, "/atmwiretransfer", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
             if(PlayerInfo < 3)
             {
                   SendClientMessage(playerid, COLOR_GRAD1, "   Moras Biti LVL 3 !");
                   return 1;
             }
             if(PlayerToPoint(3.0,playerid,1210.9574,-915.6220,43.0260) || PlayerToPoint(3.0,playerid,589.3055,-1253.3296,18.2150)
             || PlayerToPoint(3.0,playerid,1135.3281,-1471.9373,15.7919) ||  PlayerToPoint(3.0,playerid,1137.1283,-1630.1025,13.8844)
             || PlayerToPoint(3.0,playerid,1929.3414,-1769.5410,13.5469))
             {
                  SendClientMessage(playerid, COLOR_GREY, "   Nisi blizu bankomata !");
                  return 1;
             }
             tmp = strtok(cmdtext, idx);
             if(!strlen(tmp))
             {
                  SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /atmtransfer [playerid/PartOfName] ");
                  return 1;
             }
             giveplayerid = ReturnUser(tmp);
             tmp = strtok(cmdtext, idx);
             if(!strlen(tmp))
             {
                  SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /atmtransfer [playerid/PartOfName] ");
                  return 1;
             }
             moneys = strval(tmp);
             if (IsPlayerConnected(giveplayerid))
             {
                  if(giveplayerid != INVALID_PLAYER_ID)
                  {
                        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        playermoney = PlayerInfo ;
                        if (moneys > 0 && playermoney >= moneys)
                        {
                              PlayerInfo -= moneys;
                              PlayerInfo += moneys;
                              format(string, sizeof(string), "   Prebacio si $%d na %s racun", moneys, giveplayer,giveplayerid);
                              PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                              SendClientMessage(playerid, COLOR_GRAD1, string);
                              format(string, sizeof(string), "   Dobio si $%d na svoj racun od %s", moneys, sendername, playerid);
                              SendClientMessage(giveplayerid, COLOR_GRAD1, string);
                              format(string, sizeof(string), "%s prebacio si $%d na %s", sendername, moneys, giveplayer);
                              if(moneys >= 500000)
                              {
                                   ABroadCast(COLOR_YELLOW,string,1);
                              }
                              printf("%s", string);
                              PayLog(string);
                              PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
                              }
                              else
                              {
                                   SendClientMessage(playerid, COLOR_GRAD1, "   Nepravilna svota transakcije.");
                              }
                       }
                }
                else
                {
                    format(string, sizeof(string), "   %d igrac nije aktivan.", giveplayerid);
                    SendClientMessage(playerid, COLOR_GRAD1, string);
                }
        }
        return 1;
    }


kordinate sam vec ubacio i radi nema erora niti warna ali treba da samo na tim kordinatam mogu podici poloziti novac

Hvala

edit by Aleksa

nevidim nigde gresku,mozda je do game moda,a ako nije,onda opet napravi  😄
GGC
5
Godfather
20. Okt. 2009.
eee tnxx hvala samo jel ima bas odredjeno mjesto gdje treba to ubaciti ili bilo gdje poslije onplayercomandtext? mozda tu zapelo nezz
hvala

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha