29.04.2010, 16:11
pawn Код:
if ( !strcmp ( cmd, "/changepass", true ) )
{
if(logged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_RED, "SERVER: You Are Not Logged In");
return 1;
}
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /changepass [password]");
return 1;
}
if(logged[playerid] == 1)
{
dini_IntSet(udb_encode(playername), "password", udb_hash(tmp));
format(string, sizeof(string), "You have successfully changed your password to %s. Dont forget it!", tmp);
SendClientMessage(playerid, COLOR_GREEN, string);
}
return 1;
}