10.03.2012, 05:34
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;
}