30.05.2010, 10:29
Extras: /changepass and /logout command
pawn Код:
if(!strcmp(cmdtext, "/logout", true))
{
Logout(playerid,true);
SendClientMessage(playerid, 0xFFFFFFFF, "Logged out.");
return 1;
}
if(!strcmp(cmdtext, "/changepass", true))
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(IsPlayerLogged(playerid))
{
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /changepass [NEW PASSWORD]");
ChangeMemberPassword(GetPlayerUsername(playerid),tmp);
SendClientMessage(playerid, 0xFFFFFFFF, "Password changed. Now you can /logout and login with new password.");
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "To use this command, you should be logged.");
}
return 1;
}