Help password
#8

pawn Код:
dcmd_adminreg(playerid, params[])
{
    #pragma unused params
    new playerfile[100];
    if(registered[playerid] == 1) return SendClientMessage(playerid, red, "ACCOUNT You are already registered in.");
    if(!strlen(params))SendClientMessage(playerid, COLOR_GREY, "|| USAGE /adminreg [password] ||");
    if(dini_Exists(playerfile))SendClientMessage(playerid, COLOR_RED, "ACCOUNT This playername is already registered you admin account! Please use /adminlog [password] to log into admin account");
    if(strlen(params) < 5) return SendClientMessage(playerid,red,"ACCOUNT: Password must be than 5 characters");
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(playerfile, sizeof(playerfile), "/maxadmin/users/%s.ini",pname);

    new playerip[20];
    GetPlayerIp(playerid, playerip, sizeof(playerip));
    dini_Create(playerfile);
    dini_Set(playerfile,"password",params);
    dini_Set(playerfile, "Ip", playerip);
    dini_IntSet(playerfile, "Level", 0);
    dini_IntSet(playerfile, "Cash", 0);
    dini_IntSet(playerfile, "Score", 0);
    dini_IntSet(playerfile, "Banned", 0);
    dini_IntSet(playerfile, "Jailed", 0);
    dini_IntSet(playerfile, "Kills", 0);
    dini_IntSet(playerfile, "Deaths", 0);
    dini_IntSet(playerfile, "Freezed", 0);
    dini_IntSet(playerfile, "Muted", 0);
    logged[playerid] = 0;
    SendClientMessage(playerid, COLOR_GREEN, "ACCOUNT: You Have Created You'r Admin Account! Please Type /adminlog [password] To Log Into Your Admin Account!.");
    return 1;
}
Reply


Messages In This Thread
Help password - by [MKD]Max - 04.02.2011, 11:13
Re: Help password - by [MKD]Max - 04.02.2011, 11:26
Re: Help password - by DRIFT_HUNTER - 04.02.2011, 11:41
Re: Help password - by [MKD]Max - 04.02.2011, 11:57
Re: Help password - by HyperZ - 04.02.2011, 12:03
Re: Help password - by xRyder - 04.02.2011, 12:04
Re: Help password - by [MKD]Max - 04.02.2011, 12:04
Re: Help password - by HyperZ - 04.02.2011, 12:06

Forum Jump:


Users browsing this thread: 2 Guest(s)