/kick and admin chat
#4

Okay, this should do what you need for an admin chat...

pawn Код:
dcmd_admin(playerid, params[])
{
    if(level[playerid] < 1) // Checking to see if they're admin level is less than one.
        return false; // If so, we stop the command.
    if(strlen(params) > 95) // We should check to see if they have a message to large for the SA-MP chat
        return SendClientMessage(playerid, 0xFFFFFFAA, "ERROR: Your message is too long!"); // It is, lets send them an error message.

    new name[MAX_PLAYER_NAME], string[128]; // Define some new variables
    GetPlayerName(playerid, name, sizeof(name)); // Get their name
    format(string, sizeof(string), "Admin Lvl %s: %s", name, params); // format the message
    MessageToAdmins(AdminColor, string); // send to the admins
    return 1;
}
Reply


Messages In This Thread
/kick and admin chat - by xir - 29.12.2010, 20:19
Re: /kick and admin chat - by Scenario - 29.12.2010, 20:24
Re: /kick and admin chat - by xir - 29.12.2010, 20:28
Re: /kick and admin chat - by Scenario - 29.12.2010, 20:34
Re: /kick and admin chat - by xir - 29.12.2010, 20:36
Re: /kick and admin chat - by xir - 29.12.2010, 20:39
Re: /kick and admin chat - by _rAped - 29.12.2010, 21:26
Re: /kick and admin chat - by Scenario - 30.12.2010, 15:51

Forum Jump:


Users browsing this thread: 4 Guest(s)