[Include] [INC] pBank |0.2 Released|
#25

I am having problems with this script.
Here is my code:
Код:
	  if(strcmp(cmd,"/bankregister",true)==0)
	  {
	    new tmp[256];
	    new playername[256];
	    new string[256];
	    tmp=strtok(cmdtext,idx);
	    if(!strlen(tmp))
	    {
				SendClientMessage(playerid,DarkGreen,"USAGE : /bankregister [password]");
				return 1;
	    }
	    if(!PlayerToPoint(3.0,playerid,2316.6160,-7.5284,26.7422)) return SendClientMessage(playerid,AdminRed,"Must be near the bank counter!");
      if(PlayerStats[playerid][BankLogged]==1) return SendClientMessage(playerid,AdminRed,"You're already logged in!");
			GetPlayerName(playerid,playername,sizeof(playername));
	    new fstring[50];
	    format(fstring,50,"%s.xcu",udb_encode(playername));
			new create=pBank_CreateBankAccount(fstring,-100,tmp);
			if(create == -1)
			{
	  		SendClientMessage(playerid,DarkGreen,"You have already registered a bank account under this name!");
	  		SendClientMessage(playerid,DarkGreen,"Use /banklogin [password] to login into your bank account!");
	  		return 1;
			}
			format(string,sizeof(string),"You are now bankregistered under playername %s and password %s!",playername,tmp);
			SendClientMessage(playerid,DarkGreen,string);
		 	printf("%s registered a bank account with password %s",playername,tmp);
		 	return 1;
	  }
	  if(strcmp(cmd,"/banklogin",true)==0)
	  {
	    new tmp[256];
	    new playername[256];
	    tmp=strtok(cmdtext,idx);
	    if(!strlen(tmp))
	    {
	      SendClientMessage(playerid,DarkGreen,"USAGE : /banklogin [password]");
	      return 1;
	    }
			if(!PlayerToPoint(3.0,playerid,2316.6160,-7.5284,26.7422)) return SendClientMessage(playerid,AdminRed,"Must be near the bank counter!");
			if(PlayerStats[playerid][BankLogged]==1) return SendClientMessage(playerid,AdminRed,"You're already logged in!");
	    GetPlayerName(playerid,playername,sizeof(playername));
	    new fstring[50];
	    format(fstring,50,"%s.xcu",udb_encode(playername));
	    new login=pBank_LoginPlayerToBank(fstring,tmp);
	    if(login==-1)
	    {
	      SendClientMessage(playerid,DarkGreen,"Invalid Password!");
	      return 1;
	    }
	    if(login==0)
	    {
	      SendClientMessage(playerid,DarkGreen,"You have not registered a bank account yet under this name!");
	      SendClientMessage(playerid,DarkGreen,"Use /bankregister [password] to create a bank account!");
	      return 1;
	    }
	    PlayerStats[playerid][BankLogged]=1;
	    SendClientMessage(playerid,DarkGreen,"You have successfully logged in into your bank account!");
	    return 1;
	  }
/bankregister works, but after I use the command it says SERVER : Unknown Command
/banklogin doesn't work, it keeps saying invalid password...

Help?

This is an freakin annoying bug.. thx for helping

NOTE : This is not my script's identation... lol
Reply


Messages In This Thread
[INC] pBank |0.2 Released| - by Pixels^ - 17.09.2008, 00:23
Re: [INC] pBank [Extensive Banking System] - by webflashing - 17.09.2008, 00:37
Re: [INC] pBank [Extensive Banking System] - by Pixels^ - 17.09.2008, 00:44
Re: [INC] pBank [Extensive Banking System] - by webflashing - 17.09.2008, 00:48
Re: [INC] pBank [Extensive Banking System] - by Pixels^ - 17.09.2008, 00:53
Re: [INC] pBank [Extensive Banking System] - by [Jay] - 17.09.2008, 01:48
Re: [INC] pBank [Extensive Banking System] - by Pixels^ - 17.09.2008, 01:53
Re: [INC] pBank [Extensive Banking System] - by Rome101 - 17.09.2008, 16:46
Re: [INC] pBank [Extensive Banking System] - by Pixels^ - 17.09.2008, 20:43
Re: [INC] pBank [Extensive Banking System] - by sebihunter - 18.09.2008, 14:28
Re: [INC] pBank [Extensive Banking System] - by Antironix - 18.09.2008, 14:51
Re: [INC] pBank [Extensive Banking System] - by Donuts - 18.09.2008, 15:12
Re: [INC] pBank [Extensive Banking System] - by Pixels^ - 18.09.2008, 20:54
Re: [INC] pBank |0.2 Released| - by romeotheboss - 19.09.2008, 13:10
Re: [INC] pBank |0.2 Released| - by gijs_min - 15.11.2008, 10:54
Re: [INC] pBank |0.2 Released| - by x-cutter - 15.11.2008, 14:38
Re: [INC] pBank |0.2 Released| - by gijs_min - 16.11.2008, 10:26
Re: [INC] pBank |0.2 Released| - by MenaceX^ - 16.11.2008, 10:28
Re: [INC] pBank |0.2 Released| - by Pixels^ - 16.11.2008, 16:37
Re: [INC] pBank |0.2 Released| - by x-cutter - 06.12.2008, 23:48
Re: [INC] pBank |0.2 Released| - by Donuts - 06.12.2008, 23:51
Re: [INC] pBank |0.2 Released| - by x-cutter - 07.12.2008, 00:05
Re: [INC] pBank |0.2 Released| - by LightFight™ - 07.12.2008, 00:43
Re: [INC] pBank |0.2 Released| - by x-cutter - 07.12.2008, 00:55
Re: [INC] pBank |0.2 Released| - by x-cutter - 07.12.2008, 12:25
Re: [INC] pBank |0.2 Released| - by SuperS0nic - 24.01.2009, 18:37
Re: [INC] pBank |0.2 Released| - by Fish - 26.06.2009, 12:03
Re: [INC] pBank |0.2 Released| - by [ProX]BlueFire - 31.03.2011, 14:53
Re: [INC] pBank |0.2 Released| - by Medal Of Honor team - 31.03.2011, 14:54
Re: [INC] pBank |0.2 Released| - by [ProX]BlueFire - 02.04.2011, 19:23
Re: [INC] pBank |0.2 Released| - by [ProX]BlueFire - 02.04.2011, 19:27

Forum Jump:


Users browsing this thread: 1 Guest(s)