30.03.2011, 13:12
Код:
if(strcmp(cmd, "/changepass", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You need to login first."); return 1; } else { SendClientMessage(playerid, COLOR_GREY, " "); } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /changepass [password]"); return 1; } strmid(PlayerInfo[playerid][pKey], tmp, 0, strlen(cmdtext), 255); OnPlayerUpdate(playerid); SendClientMessage(playerid, COLOR_YELLOW, " Password has been changed successfuly"); } return 1; }