04.06.2011, 13:20
Well, you have added the defines for the commands in DCMD, but you did not add the commands itself yet, so that won't work.
Also, this
Won't work as you did not put it in a command, it's just floating somewhere in OnPlayerCommandText.
To fix them, just add the commands and put that code ^ in a command.
Edit: also remove
From under the DCMD stuff. You should learn scripting before trying such things
Also, this
pawn Код:
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);
}
To fix them, just add the commands and put that code ^ in a command.
Edit: also remove
pawn Код:
return 0;