SendAdminCommand
#1

Hello i donґt know how to make a system that if one admin write an admin command, then it will sent message to others administrators. "Admin x used command x." and same for normal players, all typed commands will sent to an administrator
Код:
CMD:matar(playerid, params[])
{
    if(DatosUsuario[playerid][Nivel] >=1 || IsPlayerAdmin(playerid))
    {
        new target,string[256];
        if(sscanf(params, "d", target)) return SendClientMessage(playerid, Amarillo, "[Informaciуn]  Usa:{FFFFFF} /matar (jugador)"), SendClientMessage(playerid, Amarillo, "Este comando sirve para matar a un jugador."), PlayerPlaySound(playerid,1150,0.0,0.0,0.0);
        if(!IsPlayerConnected(target)) return PlayerPlaySound(playerid,1140,0.0,0.0,0.0), SendClientMessage(playerid, Rojo, "[ERROR] {FFFFFF}El jugador no estб conectado."), PlayerPlaySound(playerid,1140,0.0,0.0,0.0);
        SetPlayerHealth(target,0);
        format(string,sizeof(string),"[Informaciуn]{FFFFFF} Administrador {bc277e}%s {FFFFFF}ha matado a {FF9900}%s{FFFFFF}.",NombreJugador(playerid),NombreJugador(target));
        SendClientMessageToAll(Amarillo,string);
        //printf("Administrador %s (%d) ha matado a %s (%d)",NombreJugador(playerid),playerid,NombreJugador(target),target);
    }
    else SendClientMessage(playerid, Rojo,"[Advertencia]{FFFFFF} No estбs autorizado para usar este comando."), PlayerPlaySound(playerid,1140,0.0,0.0,0.0);
    return 1;
}
Here is one admin command...
Reply


Messages In This Thread
SendAdminCommand - by karoliko - 20.05.2016, 19:05
Re: SendAdminCommand - by Abagail - 20.05.2016, 19:09
Re: SendAdminCommand - by F1N4L - 20.05.2016, 19:09
Re: SendAdminCommand - by karoliko - 20.05.2016, 19:16
Re: SendAdminCommand - by F1N4L - 20.05.2016, 19:40
Re: SendAdminCommand - by karoliko - 20.05.2016, 19:52
Re: SendAdminCommand - by F1N4L - 20.05.2016, 20:05
Re: SendAdminCommand - by karoliko - 20.05.2016, 21:29

Forum Jump:


Users browsing this thread: 1 Guest(s)