Jump to content
  • Global

    Global

    Chatroom Rules

    • NO SE DA SOPORTE EN CHATBOX
    • NO SPAM
    • NO FLOOD

Recommended Posts

  • Usuario
Posted (edited)

Bueno amigos necesito su ayuda :c les quiero decir si me dan una guia o algun programa porque quiero hacer un admin chat para que hablen solo los administradores si me ayudan se los agradeceria mucho c;

Edited by **Tronix**
  • Usuario
Posted (edited)
public OnPlayerText(playerid, text[])
{
    if(IsPlayerAdmin(playerid) && text[0] == '#')
    {
         new msg[128], pName[MAX_PLAYER_NAME];
         GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
         format(msg, sizeof(msg), "[ADMIN CHAT] %s (ID %d): %s", pName, playerid, text[1]);
         SendMessageToAdmins(msg);
    }
    return 1;
}

 

stock SendMessageToAdmins(text[]) {
    for(new i = 0, i < MAX_PLAYERS, i++) {
        if(IsPlayerAdmin(i)) {
            SendClientMessage(i, -1, text);
        }
    }
}

 

 

cambia el # por el prefijo que quieras, o si tienes una variable que contenga la informacion sobre en nivel de admin ponla en el if

Edited by Chiri
  • Usuario
Posted
public OnPlayerText(playerid, text[])
{
    if(IsPlayerAdmin(playerid) && text[0] == '#')
    {
         new msg[128], pName[MAX_PLAYER_NAME];
         GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
         format(msg, sizeof(msg), "[ADMIN CHAT] %s (ID %d): %s", pName, playerid, text[1]);
         SendMessageToAdmins(msg);
    }
    return 1;
}

 

stock SendMessageToAdmins(text[]) {
    for(new i = 0, i < MAX_PLAYERS, i++) {
        if(IsPlayerAdmin(i)) {
            SendClientMessage(i, -1, text);
        }
    }
}

 

 

cambia el # por el prefijo que quieras, o si tienes una variable que contenga la informacion sobre en nivel de admin ponla en el if

;0 gracias por ayudarme c;

Posted

Pero que en el panel no ai chat ? creo que si

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...