Last Commands
#3

Quote:
Originally Posted by DobbysGamertag
Посмотреть сообщение
You can do

pawn Код:
forward OnPlayerCommandPerformed(playerid, cmdtext[], success);
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) //send it to admins or save to file.
        if(success)
        //do the same as above.
    return 1;
}
not sure if this is what you want, the way i've done it is a watchlist, if the person is on there, it sends the command that they entered to admins as " xx entered command: xx" and saves to file, if they arent, it saves to file.

like this:

Код:
[01/06/2013 | 07:42:17] Dobby entered command /rc 134
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) return SendClientMessage(playerid, SERVERCOLOR, "SERVER: This command is unknown, use /help for a list of commands.");  //If the command was wrong/invalid
    if(success)
    {
        format(Player[playerid][CMD1], 129, "%s", Player[playerid][CMD2]);
        format(Player[playerid][CMD2], 129, "%s", Player[playerid][CMD3]);
        format(Player[playerid][CMD3], 129, "%s", Player[playerid][CMD4]);
        format(Player[playerid][CMD4], 129, "%s", Player[playerid][CMD5]);
        format(Player[playerid][CMD5], 129, "%s", cmdtext);
    }
    return 1;
}
Would this work?
Reply


Messages In This Thread
Last Commands - by Stefand - 01.06.2013, 07:08
Re: Last Commands - by DobbysGamertag - 01.06.2013, 07:22
Re: Last Commands - by Stefand - 01.06.2013, 07:37
Re: Last Commands - by DobbysGamertag - 01.06.2013, 07:41
Re: Last Commands - by Stefand - 01.06.2013, 07:47
Re: Last Commands - by Stefand - 01.06.2013, 08:04

Forum Jump:


Users browsing this thread: 2 Guest(s)