28.10.2013, 19:48
pawn Код:
CMD:register(playerid,params[])
{
if(gPlayerInfo[playerid][PLAYER_REGGED] == 1)
return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: You have already registered!");
else if(!params[0])
return SendClientMessage(playerid, COLOUR_ORANGE, "USAGE: /register [password]");
/*else if(strlen(params) < gSettings[PASS_MIN] || strlen(params) > gSettings[PASS_MAX])
{
new string[128];
format(string, sizeof(string), "ERROR: Password must be between %d and %d characters long!", gSettings[PASS_MIN], gSettings[PASS_MAX]);
return SendClientMessage(playerid, COLOUR_ORANGE, string);
}*/
else
{
new password = num_hash(params);
gPlayerInfo[playerid][PLAYER_PASS] = password;
gPlayerInfo[playerid][PLAYER_REGGED] = 1;
gPlayerInfo[playerid][PLAYER_LOGGED] = 1;
GetPlayerIp(playerid, gPlayerInfo[playerid][PLAYER_IP], 16);
new string[128]; format(string, sizeof(string), "You have successfully registered your account with the password \'%s\'. You have been automatically logged in.", params);
return SendClientMessage(playerid, COLOUR_LIGHTBLUE, string);
}
}
problem
pawn Код:
D:\Server\filterscripts\script.pwn(181) : error 017: undefined symbol "num_hash"
D:\Server\filterscripts\script.pwn(200) : error 017: undefined symbol "num_hash"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.