14.12.2010, 01:38
I set up a view commands system in my server. Problem is, you can see passwords when people register, login, etc.. I thought if I used strfind to pickout the text it would stop it. I was wrong, now I need help.
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
GetPlayerName(playerid, pname, sizeof(pname));
new string1[256], string2[256], pname[MAX_PLAYER_NAME];
format(string1, sizeof(string1), "[View Commands]: %s(%d): %s",pname,playerid,cmdtext);
format(string2, sizeof(string2), "Command Text: %s by: %s",cmdtext,pname);
if(strfind("/login", "/login") || strfind("/register", "/register") || strfind("/changepass", "/changepass"))
{
return 1;
}else{
SendClientMessageToAdmins(GREY, string1, 3);
CMDLog(string2);
}
if(success) {
return 1;
}else{
return 0;
}
}