WHAT IS WRONG WITH THIS ATM? PLEASE HELP!
#1

Hi here is code

Код:
//------------------------------------[ATM SYSTEM]---------------------------------------------
  if(strcmp(cmd, "/atmw", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(!PlayerToPoint(5, playerid, 1836.257,-1692.148,13.016) || !PlayerToPoint(5, playerid, 484.380,-1462.363,18.127)
        ||!PlayerToPoint(5, playerid, 1498.445,-1748.956,15.106,78) || !PlayerToPoint(5, playerid, 1940.843,-2123.240,13.218)
			  ||!PlayerToPoint(5, playerid, 1211.258,-914.979,42.682))
	    {
	      SendClientMessage(playerid, COLOR_GREY, "  Not near atm !");
	      return 1;
	    }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Use: /atmw [kolicina]");
				format(string, sizeof(string), " you have $%d on account.", PlayerInfo[playerid][pAccount]);
				SendClientMessage(playerid, COLOR_GRAD3, string);
				return 1;
			}
			new cashdeposit = strval(tmp);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Use: /atmw [kolicina]");
				format(string, sizeof(string), " you have $%d on account.", PlayerInfo[playerid][pAccount]);
				SendClientMessage(playerid, COLOR_GRAD3, string);
				return 1;
			}
			if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
			{
				SendClientMessage(playerid, COLOR_GRAD2, "  You havnt too much!");
				return 1;
			}
		  ConsumingMoney[playerid] = 1;
			GivePlayerMoney(playerid,cashdeposit);
			PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
			format(string, sizeof(string), " You take $%d from account, left: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
			SendClientMessage(playerid, COLOR_YELLOW, string);
			return 1;
		}
		return 1;
	}
And here is problem...when i come to atm system and type /atmw ther is message YOU ARE NOT NEAR ATM...any problem?
Reply


Messages In This Thread
WHAT IS WRONG WITH THIS ATM? PLEASE HELP! - by buonggiorno - 02.12.2009, 17:42
Re: WHAT IS WRONG WITH THIS ATM? PLEASE HELP! - by MrPanz - 02.12.2009, 23:41
Re: WHAT IS WRONG WITH THIS ATM? PLEASE HELP! - by buonggiorno - 02.12.2009, 23:58
Re: WHAT IS WRONG WITH THIS ATM? PLEASE HELP! - by [WF]Demon - 03.12.2009, 00:08
Re: WHAT IS WRONG WITH THIS ATM? PLEASE HELP! - by buonggiorno - 03.12.2009, 00:14
Re: WHAT IS WRONG WITH THIS ATM? PLEASE HELP! - by bigcomfycouch - 03.12.2009, 02:38

Forum Jump:


Users browsing this thread: 1 Guest(s)