Two Small Problems
#8

pawn Код:
if(strcmp(cmd, "/register", true) == 0)
{
    if(ReqClass[playerid] != 0)
        return SendClientMessage(playerid, COLOUR_RED, "You Can Only Register After The Class Selection!");
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
        return SendClientMessage(playerid, COLOUR_YELLOW, "USAGE: /register (password)");
    format(string, sizeof(string), "\\Truckers\\%s.txt", PlayerName);
    if(dini_Exists(string))
    {
        format(string, sizeof(string), "%s Is Already Registered.", PlayerName, tmp);
        return SendClientMessage(playerid, COLOUR_RED, string);
    }
    if(!dini_Create(string)) return print("Error: Directory \"\\Trucker\\\" doesnt exist!");       
    dini_IntSet(string, "Password", udb_hash(tmp));
    dini_IntSet(string, "AdminLevel", 0);
    dini_IntSet(string, "Money", 2500);
    dini_IntSet(string, "TruckType", 413);
    dini_IntSet(string, "JobsDone", 0);
    dini_IntSet(string, "JobLevel", 1);
    dini_IntSet(string, "Mission", 1);
    dini_IntSet(string, "Skin", (TruckerSkin[playerid] = GetPlayerSkin(playerid)));
    format(string, sizeof(string), "Account %s Created! You Can Now Login With /login %s", PlayerName, tmp);
    return SendClientMessage(playerid, COLOUR_LIGHTBLUE, string);
}
Reply


Messages In This Thread
Two Small Problems - by Alec24 - 05.04.2009, 09:59
Re: Two Small Problems - by Torekk - 05.04.2009, 10:14
Re: Two Small Problems - by Alec24 - 05.04.2009, 10:19
Re: Two Small Problems - by LarzI - 05.04.2009, 12:01
Re: Two Small Problems - by Alec24 - 05.04.2009, 14:35
Re: Two Small Problems - by LarzI - 08.04.2009, 00:53
Re: Two Small Problems - by Alec24 - 09.04.2009, 11:42
Re: Two Small Problems - by Nero_3D - 09.04.2009, 12:05
Re: Two Small Problems - by Alec24 - 09.04.2009, 12:30
Re: Two Small Problems - by Nero_3D - 09.04.2009, 13:26

Forum Jump:


Users browsing this thread: 3 Guest(s)