Server Crashing (Sorry for being vague)
#3

Quote:
Originally Posted by Dwane
Посмотреть сообщение
Do you use a command /register to register? If yes, can you show us the code in it.
Here you go;
pawn Код:
CMD:register(playerid, params[])
{
    if(PlayerInfo[playerid][pRegistered]) return SCM(playerid, COLOR_ERROR, "[ERROR]: You're already registered. Use {5D849C}/acp {968996}to change your password.");
    if(isnull(params)) return SCM(playerid, COLOR_ERROR, "[USAGE]: /register [password]");
    new string[256];
    if(strlen(params) > MAX_PASSWORD)
    {
        format(string, sizeof(string), "Your password cannot be longer than %d characters.", MAX_PASSWORD);
        SCM(playerid, COLOR_ERROR, string);
        return 1;
    }
    PlayerInfo[playerid][pPassword] = num_hash(params);
    format(string, sizeof(string), "You have registered this account (%s) with the password {F0CD81}%s{309E21}. Don't forget it!", RPName(playerid), params);
    SCM(playerid, COLOR_GREEN, string);
    SCM(playerid, COLOR_GREEN, "You will now be walked through the basics of this server.");
    pRegStep[playerid] = 1;
    RegisterProcess(playerid);
    if(!fexist(FilePath(0, playerid))) { file_Create(FilePath(0, playerid)); }
    FileLoaded[0][playerid] = true;
    SaveFile(0, playerid);
    return 1;
}
Reply


Messages In This Thread
Server Crashing (Sorry for being vague) - by glbracer - 26.03.2013, 13:38
Re: Server Crashing (Sorry for being vague) - by Konstantinos - 26.03.2013, 13:43
Re: Server Crashing (Sorry for being vague) - by glbracer - 26.03.2013, 13:44
Re: Server Crashing (Sorry for being vague) - by Konstantinos - 26.03.2013, 14:04
Re: Server Crashing (Sorry for being vague) - by glbracer - 26.03.2013, 14:14
Re: Server Crashing (Sorry for being vague) - by Konstantinos - 26.03.2013, 14:20
Re: Server Crashing (Sorry for being vague) - by glbracer - 26.03.2013, 14:26
Re: Server Crashing (Sorry for being vague) - by Konstantinos - 26.03.2013, 14:28
Re: Server Crashing (Sorry for being vague) - by glbracer - 26.03.2013, 15:36

Forum Jump:


Users browsing this thread: 1 Guest(s)