10.03.2012, 05:30
pawn Код:
CMD:register(playerid, params[])
{
if(IsPlayerRegister[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You are already registered!");
if(sscanf(params, "s[40]", params[1])) return SendClientMessage(playerid, COLOR_RED, "SYNTAX: /register [params[1]]");
format(file, sizeof(file), "Rank/Users/%s.ini", pName(playerid));
if(fexist(file)) return SendClientMessage(playerid, COLOR_RED, "Your account is already registered from our database");
if(!dini_Exists(file))
{
dini_Create(file);
dini_IntSet(file, "password", udb_hash(params[1]));
}
return 1;
}