View Commands problem
#7

i've been trying to tell you what to do..
try this
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(cmdtext, "/login", true) != -1 || strfind(cmdtext, "/register", true) != -1 || strfind(cmdtext, "/changepass", true) != -1)
    {
        return 1;
    }
    else
    {
        SendClientMessageToAdmins(GREY, string1, 3);
        CMDLog(string2);
    }
    return 1;
}
(untested)

edit - i dont think you can use strcmp, because cmdtext is the entire param sent.
Reply


Messages In This Thread
View Commands problem - by ScottCFR - 14.12.2010, 01:38
Re: View Commands problem - by The_Gangstas - 14.12.2010, 01:41
Re: View Commands problem - by ScottCFR - 14.12.2010, 01:52
Re: View Commands problem - by The_Gangstas - 14.12.2010, 01:56
Re: View Commands problem - by ScottCFR - 14.12.2010, 03:50
Re: View Commands problem - by XePloiT - 14.12.2010, 03:58
Re: View Commands problem - by The_Gangstas - 14.12.2010, 03:59
Re: View Commands problem - by XePloiT - 14.12.2010, 04:03
Re: View Commands problem - by The_Gangstas - 14.12.2010, 04:04
Re: View Commands problem - by XePloiT - 14.12.2010, 04:14

Forum Jump:


Users browsing this thread: 5 Guest(s)