/helme command
#1

Anyone has a command like this

if /helme [Message] send message to online administrators..

example: /helpme what is the script for this?
SendMessageToAdmin... "You're message has been send to online administrators"

If send, then show only to online administrators "[HELP][Playername][ID]: "what is the script for this?"
Reply
#2

Basically "/atalk"?
Reply
#3

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.
Reply
#4

Quote:
Originally Posted by UnknownGamer
Посмотреть сообщение
Basically "/atalk"?
Yeah atalk is admin to admin, I need player to admin.
Reply
#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
#6

Can you edit your pawn tags well and post?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)