Register Command with sscanf
#6

pawn Код:
CMD:register(playerid, params[])
{
   new pass[32];//needs to be a string
   if(IsPlayerRegister[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You are already registered!");//s for sting not i as password is string initially
   if(sscanf(params, "s", pass)) return SendClientMessage(playerid, COLOR_RED, "SYNTAX: /register [pass]");
   format(file, sizeof(file), "Rank/Users/%s.ini", pName(playerid));
   if(!dini_Exists(file)) return SendClientMessage(playerid, COLOR_RED, "Your account is already registered from our database");
    dini_Create(file);
    dini_IntSet(file, "Password", udb_hash(pass));
   return 1;
}
Reply


Messages In This Thread
Register Command with sscanf - by Reklez - 10.03.2012, 04:55
Re: Register Command with sscanf - by Ballu Miaa - 10.03.2012, 05:01
Re: Register Command with sscanf - by Reklez - 10.03.2012, 05:11
Re: Register Command with sscanf - by Ballu Miaa - 10.03.2012, 05:28
Re: Register Command with sscanf - by FarSe. - 10.03.2012, 05:30
Re: Register Command with sscanf - by eesh - 10.03.2012, 05:34
Re: Register Command with sscanf - by Reklez - 10.03.2012, 05:50
Re: Register Command with sscanf - by AustinJ - 10.03.2012, 05:53
Re: Register Command with sscanf - by Reklez - 10.03.2012, 05:59
Re: Register Command with sscanf - by AustinJ - 10.03.2012, 06:03

Forum Jump:


Users browsing this thread: 3 Guest(s)