Ño manda mensaje.
#1

No manda mensaje a los admins.

Код:
CMD:a(playerid, params[])
{
	if(InformacionJugador_[playerid][pAdmin] < 0) return 0;
    if(isnull(params))
        return SendClientMessage(playerid, COLOR_PIEL, "* Debe indicar parámetros para el comando(/a), formato: /a [Texto]");

    MandarMensajeAdmins_(playerid, params);
	return 1;
}

stock MandarMensajeAdmins_(playerid, mensaje[])
{
    new
	    _out[(75*2) + MAX_PLAYER_NAME + (11*2)];
    
	if(InformacionJugador_[playerid][pAdmin] >= 1 && InformacionJugador_[playerid][pAdmin] <= 6)
	{
		if(strlen(mensaje) > 75)
		{
			format(_out, sizeof(_out), "%s %s: %.75s ..", RangoStaff_(playerid), NombreJugador(playerid), mensaje);
			SendStaffMessage(_out);

			format(_out, sizeof(_out), "... %s", mensaje[75]);
			SendStaffMessage(_out);
		}
		else
		{

			format(_out, sizeof(_out), "%s %s: %s", RangoStaff_(playerid), NombreJugador(playerid), mensaje);
			SendStaffMessage(_out);
		}
	}
	return 1;
}

stock SendStaffMessage(string[])
{
	foreach(new i : Player)
	{
		if(InformacionJugador_[i][pConectado] == 1)
		{
		    if(InformacionJugador_[i][pAdmin] >= 1)
			{
				SendClientMessage(i, COLOR_STAFF, string);
			}
		}
	}
	return 1;
}
Reply
#2

pawn Код:
CMD:a(playerid, params[])
{
    if(InformacionJugador_[playerid][pAdmin] > 0)
    {
        new mensaje[182];
        if(isnull(mensaje))
            return SendClientMessage(playerid, COLOR_PIEL, "* Debe indicar parбmetros para el comando(/a), formato: /a [Texto]");

        MandarMensajeAdmins_(playerid, COLOR_STAFF, mensaje);
    }
    return 1;
}


MandarMensajeAdmins_(color, mensaje[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(InformacionJugador_[i][pAdmin] >= 1 && InformacionJugador_[i][pAdmin] <= 6)
        {
            if(strlen(mensaje) > 75) {
                format(_out, sizeof(_out), "%s %s: %.75s ..", RangoStaff_(playerid), NombreJugador(playerid), mensaje);
                SendClientMessage(i, COLOR_STAFF, _out);
                format(_out, sizeof(_out), "... %s", mensaje[75]);
                SendClientMessage(i, COLOR_STAFF, _out);
            }
            else {
                format(_out, sizeof(_out), "%s %s: %.75s ..", RangoStaff_(playerid), NombreJugador(playerid), mensaje);    
                SendClientMessage(i, COLOR_STAFF, _out);
            }
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)