15.04.2014, 20:13
Why are you even checking if the player is connected. That's obvious that connected player would type it.
pawn Код:
COMMAND:changepass(playerid, params[]) // Already ZCMD?
{
if(Logged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_RED, "You are not logged in !");
return 1;
}
static tmp[128]; // if you have already remove this.
if(sscanf(params, "s[128]", tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Function: {FFFFFF}/changepass [password]");
return 1;
}
strmid(PlayerInfo[playerid][pKey], tmp, 0, strlen(cmdtext), 255);
UpdatePlayerInfo(playerid);
SendClientMessage(playerid, COLOR_Milito, "Your password has been changed as you requested.");
return 1;
}