20.05.2016, 19:09
Код:
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; }