SendAdminCommand
#3

Код:
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);
		
		for(new i = 0; i < MAX_PLAYERS; i ++)
		{
			if(DatosUsuario[i][Nivel] >= 1 || IsPlayerAdmin(i))
			{
				format(string,sizeof(string),"[Informaciуn]{FFFFFF} Administrador {bc277e}%s {FFFFFF}ha matado a {FF9900}%s{FFFFFF}.",NombreJugador(playerid),NombreJugador(target));
				SendClientMessage(i,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;
}
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)