SA-MP Forums Archive
Help please - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help please (/showthread.php?tid=140086)



Help please - armyoftwo - 07.04.2010

Код:
COMMAND:openaccount(playerid, cmdtext[], params[]) 
{
	new pin;
  if(!sscanf(params, "s", pin))
  {
/*  if(!IsNumeric(pin)){
  SendClientMessage(playerid, COLOR_LIGHTRED, "Numbers only!");
  SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "HINT: /openaccount [PIN]");
  return 1;
  }
*/
  if(PlayerInfo[playerid][CreatedAcc] == 1)
  {
  SendClientMessage(playerid, COLOR_LIGHTRED, "You have already opened a account!");
  SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "HINT: You can close your account anytime, but you'll have to pay credit first.");
  return 1;
  }
  if(pin < 3 || pin > 8)
  {
  SendClientMessage(playerid, COLOR_LIGHTRED, "It must be atleast 4 to 8 numbers!");
  SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "HINT: /openaccount [PIN]");
  return 1;
  }
	PlayerInfo[playerid][pBankPin] = pin;
	PlayerInfo[playerid][CreatedAcc] = 1;
  SendClientMessage(playerid, COLOR_LIGHTRED, "Account succesfully created! You may manage it now.");
  return 1;
  }else{  SendClientMessage(playerid, COLOR_LIGHTRED, "/openaccount [PIN].");}
  return 1;
}
It sends me the /openaccount [PIN] message, what's the problem?


Re: Help please - -Rebel Son- - 07.04.2010

Is it not loading the pin?