Ñ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


Messages In This Thread
Ño manda mensaje. - by Fagrinht - 10.07.2016, 03:23
Re: Сo manda mensaje. - by KennySec - 10.07.2016, 07:05

Forum Jump:


Users browsing this thread: 1 Guest(s)