/helme command
#5

Quote:
Originally Posted by [MWR]Blood
Посмотреть сообщение
Run a loop through all the players, detect who of them is an admin, and send them the message.
Something like
pawn Код:
function SendAdminMessage(color,const str[])
{
    foreach(Player,i)
    {
        if(PInfo[i][Level] > 0)
        {
            SendClientMessage(i,color,str);
        }
    }
    return 1;
}
Using foreach.
Don't know much about this. is there any easiest way like this below..
pawn Код:
CMD:helpme(playerid, params[])
{
    if ( isnull ( params ) ) return SendClientMessage(playerid, COLOR_YELLOW, #Syntax Usage: /helpme [message] );

    new
        _msg[ 128 ],
        player_name[ MAX_PLAYER_NAME ];

    GetPlayerName( playerid, player_name, MAX_PLAYER_NAME );
    format( _msg, sizeof ( _msg ), "%s Bug reported: %s\r\n", player_name, params );
    new File: fileToWrite = fopen("help.txt", io_append);
    fwrite(fileToWrite, _msg);
    fclose(fileToWrite);

    return 1;
}

But without saving it.. Also It must have a tag [HELP] before the name and Id.
Like this [HELP][Booger][7]: Thanks for your reply Appreciate!
Reply


Messages In This Thread
/helme command - by kbalor - 21.08.2012, 17:55
Re: /helme command - by UnknownGamer - 21.08.2012, 17:56
Re: /helme command - by [MWR]Blood - 21.08.2012, 17:58
Re: /helme command - by kbalor - 21.08.2012, 18:16
Re: /helme command - by kbalor - 21.08.2012, 18:27
Re: /helme command - by Lordzy - 21.08.2012, 18:31

Forum Jump:


Users browsing this thread: 2 Guest(s)