Register cmd problem
#1

Hello,i've a problem with this cmd,the params dont work.

pawn Код:
CMD:register(playerid, params[])
{
  new file[128], pname[MAX_PLAYER_NAME];
  GetPlayerName(playerid, pname, sizeof(pname));
  format(file, sizeof(file), "\\Users\\%s.ini", pname);
  if(!strlen(params)) return SendClientMessage(playerid, red, "Usage: /register [password]");
  if(dini_Exists(file)) return SendClientMessage(playerid, red, "You are already registered! Use /login <password>");
  dini_Create(file);
  dini_IntSet(file, "hashPW", udb_hash(params));
  dini_Set(file, "password", params);
  dini_IntSet(file, "level", 0);
  dini_IntSet(file, "score", GetPlayerScore(playerid));
  dini_IntSet(file, "money", GetPlayerMoney(playerid));
  new string[128];
  format(string, 128, "You succesfully registered the nickname %s with password %s", pname, params);
  SendClientMessage(playerid, yellow, string);
  logged[playerid] = 1;
  SendClientMessage(playerid, yellow, "You have been automatically logged in!");
  return true;
}
If i do just /register,the server let me register with no password,when it's need to be the opposite. (/register password).

I use zcmd.What's wrong?
Reply


Messages In This Thread
Register cmd problem - by Face9000 - 19.02.2012, 15:27
Re: Register cmd problem - by Madd Kat - 19.02.2012, 15:35
Re: Register cmd problem - by emokidx - 19.02.2012, 15:38
Re: Register cmd problem - by JhnzRep - 19.02.2012, 15:40
Re: Register cmd problem - by Face9000 - 19.02.2012, 16:06

Forum Jump:


Users browsing this thread: 1 Guest(s)