[AYUDA] POR QUE NO ME ANDA EL CHAT STAFF?
#1

Hola, mi problema es que tengo un sistema administrativo y el chat staff al hablar con "#" No lo agarra, pero pues eh intentado de muchas maneras asta cambiarlo de otro sistema y aun asi no anda, por favor necesito su ayuda..

Dejo todo el codigo del OnPlayerText talvez tengo un error ai para que no aparesca, les dejare todo el codigo..

pawn Код:
public OnPlayerText(playerid, text[])
{
if(PlayerInfo[playerid][Level] >= 5) {
new chat[130];
format(chat, sizeof(chat), "{F20000}[{FFFFFF}%d{F20000}]{F20000}[ADMIN]: {FFFFFF}%s", playerid, text);
SendPlayerMessageToAll(playerid,chat);
SetPlayerChatBubble(playerid, text, red, 100.0, 10000);
return 0;
}
if(PlayerInfo[playerid][Level] >= 10) {
new chat[130];
format(chat, sizeof(chat), "{F20000}[{FFFFFF}%d{F20000}]{F6A000}[CEO]: {FFFFFF}%s", playerid, text);
SendPlayerMessageToAll(playerid,chat);
SetPlayerChatBubble(playerid, text, red, 100.0, 10000);
return 0;
}
if(PlayerInfo[playerid][Level] >= 1) {
new chat[130];
format(chat, sizeof(chat), "{F20000}[{FFFFFF}%d{F20000}]{00FF00}[MOD]: {FFFFFF}%s", playerid, text);
SendPlayerMessageToAll(playerid,chat);
SetPlayerChatBubble(playerid, text, red, 100.0, 10000);
return 0;
}
if(PlayerInfo[playerid][pVip] >= 1) {
new chat[130];
format(chat, sizeof(chat), "{F20000}[{FFFFFF}%d{F20000}]{00C5FC}[VIP]: {FFFFFF}%s", playerid, text);
SendPlayerMessageToAll(playerid,chat);
SetPlayerChatBubble(playerid, text, red, 100.0, 10000);
return 0;
}
//==============================================================================
// Vip Chat y Chat de los Administradores
//==============================================================================
    if(ServerInfo[AntiSwear] == 1 && PlayerInfo[playerid][Level] < 6)
    for(new s = 0; s < ForbiddenWordCount; s++)
    {
        new pos;
        while((pos = strfind(text,ForbiddenWords[s],true)) != -1) for(new i = pos, j = pos + strlen(ForbiddenWords[s]); i < j; i++) text[i] = '*';
    }

    if(text[0] == '#' && PlayerInfo[playerid][Level] >= 1) {
        GetPlayerName(playerid,string2,sizeof(string2));
        format(string2,sizeof(string2),"{00FF00}Chat Staff: %s[%d]:{FFFFFF} %s",string2, playerid, text[1]); MessageToAdmins(green,string2);
        return 0;
    }

    if(text[0] == '$' && PlayerInfo[playerid][pVip] >= 1)
    {
        GetPlayerName(playerid,string2,sizeof(string2));
        format(string2,sizeof(string2),"{10FFDF}|ChatVip| %s[%d]: %s",string2, playerid, text[1]);
        MessageToPlayerVIP(0xDC686BAA,string2);
        return 0;
    }
    if(text[0] == '*' && PlayerInfo[playerid][Level] >= 7) {
        GetPlayerName(playerid,string2,sizeof(string2));
        format(string2,sizeof(string2),"{FF0606}Chat Staff CEO: %s[%d]:{FFFFFF} %s",string2, playerid, text[1]); MessageToAdmins(green,string2);
        return 0;
    }


    if(ServerInfo[DisableChat] == 1) {
        SendClientMessage(playerid,red,"El Chat ha sido desactivado");
        return 0;
    }

    if(PlayerInfo[playerid][Muted] == 1)
    {
        PlayerInfo[playerid][MuteWarnings]++;
        if(PlayerInfo[playerid][MuteWarnings] < ServerInfo[MaxMuteWarnings]) {
            format(string2, sizeof(string2),"CUIDADO: Estas muteado, si continuas hablando seras kickeado por DMA. (%d / %d)", PlayerInfo[playerid][MuteWarnings], ServerInfo[MaxMuteWarnings] );
            SendClientMessage(playerid,red,string2);
        } else {
            SendClientMessage(playerid,red,"Has sido advertido ! Ahora has sido kickeado");
            format(string2, sizeof(string2),"***%s (ID %d) ha sido kickeado by Administrador bot DMA [Razon: Exceder las muteadas]", PlayerName2(playerid), playerid);
            SendClientMessageToAll(red,string2);
            SaveToFile("KickLog",string2); Kick(playerid);
        } return 0;
    }

    if(DetectarSpam(text))
    {
    if(PlayerInfo[playerid][Level] == 0 && !IsPlayerAdmin(playerid))
    {
        GetPlayerName(playerid,string2,sizeof(string2));
        ShowPlayerDialog(playerid, 12, DIALOG_STYLE_MSGBOX, "{00FFFF}Anti Spam", "{FFFFFF}No Puedes Hacer Spam o Seras {FF0000}Baneado", "Aceptar", "");
        format(string2,sizeof(string2),"[INFO-ADMINS]: {FFFFFF}%s {FF0000}Id: {FFFFFF}[%i] {FF0000}Posible Spam Dijo: %s",string2,playerid,text);
        MessageToAdmins(COLOR_RED,string2);
        return 0;
    }
    }

    if(PlayerInfo[playerid][Caps] == 1) UpperToLower(text);
    if(ServerInfo[NoCaps] == 1) UpperToLower(text);

    for(new i = 1; i < MAX_CHAT_LINES-1; i++) Chat[i] = Chat[i+1];
    new ChatSTR[128]; GetPlayerName(playerid,ChatSTR,sizeof(ChatSTR)); format(ChatSTR,128,"[lchat]%s: %s",ChatSTR, text[0] );
    Chat[MAX_CHAT_LINES-1] = ChatSTR;
    return 1;
}
Bueno espero que me ayuden, saludos!
Reply
#2

EDIT: Me confundн, no habнa visto que pusiste el "MessageToAdmins" al lado del sendclientmessage entonces pense que el error venнa por no introducir el mismo.
Reply
#3

Prueba con un comando de verdad xD
Код:
zcmd(adminchat, bla bla
Reply
#4

Quote:
Originally Posted by Shura
Посмотреть сообщение
Prueba con un comando de verdad xD
Код:
zcmd(adminchat, bla bla
yo nose como hacerlo, soy nuevo en esto, pero pues minimo fuera por comando y que solo los administradores lo vieran, yo intente hacerlo con la idea que dio, pero como digo yo nose mucho de esto y no me salio.

lo ise haci..

En el comando puse asi..
pawn Код:
dcmd_chat(playerid,params[]) {
    #pragma unused params
    new chatadmin[256];
    if(PlayerInfo[playerid][Level] >= 1) {
        if(!strlen(params)) return SendClientMessage(playerid, red, "USE: /Chat [texto]");
        GetPlayerName(playerid,chatadmin,sizeof(chatadmin));
        format(chatadmin,sizeof(chatadmin),"|ChatAdmin| %s[%d]: %s",chatadmin, playerid);
        return MessageToAdmins(0x33FF33AA,chatadmin);
    } else return SendClientMessage(playerid,red,"{FFFFFF}ERROR: {29FF0D}Necesitas ser {FFFFFF}Moderador Nuevo (LEVEL1) {29FF0D}para usar este comando");
}
Mis errores fueron que pongo /Chat pero no aparese lo que escribi osea el mensaje tambien, aparece para todos y no para nomas para los administradores..

ALGUIEN QUE ME AYUDE!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)